SteamWar/FightSystem
Archiviert
13
1

Fix of the BLUE BUG!!!!!!!!!! PARTYYYYYYY

Dieser Commit ist enthalten in:
Travis CI 2019-07-01 20:10:25 +02:00
Ursprung d2e0093431
Commit 53b4514c24

Datei anzeigen

@ -66,14 +66,11 @@ public class TechHider {
obfuscateShift4 = (short)(Config.ObfuscateWith << 4);
obfuscateMaterial = Material.getMaterial(Config.ObfuscateWith);
System.out.println("Arena: " + arenaMinX + "->" + arenaMaxX + " " + arenaMinZ + "->" + arenaMaxZ);
System.out.println("Blue: " + blueMinX + "->" + blueMaxX + " " + blueMinZ + "->" + blueMaxZ);
System.out.println("Red: " + redMinX + "->" + redMaxX + " " + redMinZ + "->" + redMaxZ);
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(FightSystem.getPlugin(), PacketType.Play.Server.MAP_CHUNK) {
@Override
public void onPacketSending(PacketEvent e) {
PacketContainer packet = e.getPacket();
PacketContainer packet = e.getPacket().deepClone();
e.setPacket(packet);
StructureModifier<Integer> ints = packet.getIntegers();
StructureModifier<byte[]> byteArray = packet.getByteArrays();
StructureModifier<List> list = packet.getSpecificModifier(List.class);
@ -85,7 +82,6 @@ public class TechHider {
if(bypass(p, chunkX, chunkZ))
return;
System.out.println("Sending hidden chunk " + chunkX + " " + chunkZ + " to " + p.getName());
boolean changed = false;
for(int i = nmsTags.size() - 1; i >= 0; i--){
NbtCompound nbt = NbtFactory.fromNMSCompound(nmsTags.get(i));
@ -172,7 +168,8 @@ public class TechHider {
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(FightSystem.getPlugin(), PacketType.Play.Server.BLOCK_CHANGE) {
@Override
public void onPacketSending(PacketEvent e) {
PacketContainer packet = e.getPacket();
PacketContainer packet = e.getPacket().deepClone();
e.setPacket(packet);
StructureModifier<WrappedBlockData> blockStructure = packet.getBlockData();
BlockPosition pos = packet.getBlockPositionModifier().read(0);
@ -190,7 +187,8 @@ public class TechHider {
ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(FightSystem.getPlugin(), PacketType.Play.Server.MULTI_BLOCK_CHANGE) {
@Override
public void onPacketSending(PacketEvent e) {
PacketContainer packet = e.getPacket();
PacketContainer packet = e.getPacket().deepClone();
e.setPacket(packet);
StructureModifier<MultiBlockChangeInfo[]> blockStructure = packet.getMultiBlockChangeInfoArrays();
MultiBlockChangeInfo[] changes = blockStructure.read(0);