diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index ff3ba653a..76a62da7a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -118,13 +118,13 @@ public class Arcade extends JavaPlugin GadgetManager gadgetManager = new GadgetManager(this, _clientManager, _donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager); CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, true); cosmeticManager.setInterfaceSlot(7); - new CustomTagFix(this, packetHandler); - + //Arcade Manager _gameManager = new ArcadeManager(this, serverStatusManager, ReadServerConfig(), _clientManager, _donationManager, _damageManager, disguiseManager, creature, teleport, new Blood(this), antistack, portal, preferenceManager, inventoryManager, packetHandler, cosmeticManager, projectileManager, petManager, webServerAddress); new PlayerTracker(this, serverStatusManager.getCurrentServerName(), serverStatusManager.getUs()); new MemoryFix(this); + new CustomTagFix(this, packetHandler); new FriendManager(this, preferenceManager); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java index 306fa99e1..4d43ee209 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java @@ -69,8 +69,7 @@ import nautilus.game.arcade.kit.Kit; import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.KitSorter; import net.minecraft.server.v1_7_R4.Packet; -import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata; -import net.minecraft.server.v1_7_R4.WatchableObject; +import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityLiving; public class GameLobbyManager implements Listener, IPacketHandler { @@ -1086,16 +1085,16 @@ public class GameLobbyManager implements Listener, IPacketHandler { if (_handlingPacket) return; - + Packet packet = packetInfo.getPacket(); Player owner = packetInfo.getPlayer(); PacketVerifier packetVerifier = packetInfo.getVerifier(); int entityId = -1; - if (packet instanceof PacketPlayOutEntityMetadata) + if (packet instanceof PacketPlayOutSpawnEntityLiving) { - entityId = ((PacketPlayOutEntityMetadata)packet).a; + entityId = ((PacketPlayOutSpawnEntityLiving)packet).a; } if (entityId != -1) @@ -1116,33 +1115,12 @@ public class GameLobbyManager implements Listener, IPacketHandler { try { - if (packet instanceof PacketPlayOutEntityMetadata) + if (packet instanceof PacketPlayOutSpawnEntityLiving) { - List watchables = new ArrayList(); - - for (WatchableObject watchableObject : (List)((PacketPlayOutEntityMetadata) packet).b) - { - WatchableObject newWatch = new WatchableObject(watchableObject.c(), watchableObject.a(), watchableObject.b()); - - if (newWatch.a() == 10) - { - newWatch.a(customName); - } - - watchables.add(newWatch); - } - - PacketPlayOutEntityMetadata newPacket = new PacketPlayOutEntityMetadata(); - newPacket.a = entityId; - newPacket.b = watchables; - - _handlingPacket = true; - packetVerifier.process(newPacket); - _handlingPacket = false; - - packetInfo.setCancelled(true); + ((PacketPlayOutSpawnEntityLiving)packet).l.watch(2, customName); + ((PacketPlayOutSpawnEntityLiving)packet).l.watch(10, customName); } - } + } catch (IllegalArgumentException e) { e.printStackTrace();