This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.example; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import org.bukkit.plugin.Plugin; | |
import org.bukkit.plugin.java.JavaPlugin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.example; | |
import java.io.ByteArrayOutputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.util.Arrays; | |
import java.util.concurrent.ConcurrentMap; | |
import org.bukkit.entity.Player; | |
import org.bukkit.plugin.java.JavaPlugin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.test; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.OutputStream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.example; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import org.bukkit.Material; | |
import org.bukkit.inventory.Inventory; | |
import org.bukkit.inventory.ItemStack; | |
import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.example; | |
import java.sql.Ref; | |
import java.util.Collections; | |
import java.util.UUID; | |
import net.minecraft.util.io.netty.channel.Channel; | |
import org.bukkit.Material; | |
import org.bukkit.command.Command; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.example; | |
import org.bukkit.ChatColor; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.Listener; | |
import org.bukkit.plugin.java.JavaPlugin; | |
import org.json.simple.JSONObject; | |
public class ChangingUnknownCommand extends JavaPlugin implements Listener { | |
private MessageTransformer transformer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.example; | |
import java.util.concurrent.ConcurrentMap; | |
import org.bukkit.plugin.java.JavaPlugin; | |
import com.comphenix.protocol.PacketType; | |
import com.comphenix.protocol.events.PacketContainer; | |
import com.comphenix.protocol.injector.StructureCache; | |
import com.comphenix.protocol.reflect.FieldUtils; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.testing; | |
import java.util.Random; | |
public class Test { | |
private static final int SIMULATION_COUNT = 1_000_000_000; | |
public static void main(String[] args) throws Exception { | |
Random rnd = new Random(); | |
int amazWin = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.comphenix.test; | |
import java.util.Objects; | |
public class PatternMatchingTest { | |
public static void main(String[] args) throws Exception { | |
AddNode zeroPlusOne = new AddNode(IntNode.ZERO, IntNode.ONE); | |
AddNode onePlusOne = new AddNode(IntNode.ONE, IntNode.ONE); | |
System.out.println("Testing our proposed fix: "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class TimeMap<TKey extends Comparable<TKey>, TValue> { | |
public static void main(String[] args) { | |
TimeMap<Integer, Integer> map = new TimeMap<>(); | |
map.set(1, 1, 0); | |
map.set(1, 2, 2); | |
map.remove(1, 3); | |
map.set(2, 100, 0); |