From 664e5c7734c65f6bb44acc95ce8c330c1ac6ece8 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Sat, 17 Jun 2017 17:46:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=97=A0=E6=95=88=E7=9B=91=E5=90=AC=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../maxgamer/QuickShop/Shop/Item/FakeItem.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/main/java/org/maxgamer/QuickShop/Shop/Item/FakeItem.java b/src/main/java/org/maxgamer/QuickShop/Shop/Item/FakeItem.java index 5e28f4e..cc7bf61 100644 --- a/src/main/java/org/maxgamer/QuickShop/Shop/Item/FakeItem.java +++ b/src/main/java/org/maxgamer/QuickShop/Shop/Item/FakeItem.java @@ -5,7 +5,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.Chunk; @@ -75,24 +74,7 @@ public abstract class FakeItem extends DisplayItem { } } }; - final PacketAdapter chunkBulkPacketListener = new PacketAdapter(plugin, PacketType.Play.Server.MAP_CHUNK_BULK) { - @Override - public void onPacketSending(final PacketEvent event) { - try { - final PacketContainer packet = event.getPacket(); - final Player p = event.getPlayer(); - final int[] chunksX = packet.getIntegerArrays().read(0); - final int[] chunksZ = packet.getIntegerArrays().read(1); - for (int i = 0; i < chunksX.length; i++) { - final List fakesInChunk = fakes.get(getChunkIdentifyString(p.getWorld().getChunkAt(chunksX[i], chunksZ[i]))); - sendChunkPacket(p, fakesInChunk); - } - } catch (final Exception ignored) { - } - } - }; ProtocolLibrary.getProtocolManager().addPacketListener(chunkPacketListener); - ProtocolLibrary.getProtocolManager().addPacketListener(chunkBulkPacketListener); registered = true; }