From 9594db67af267f2c82a92031fc74e4fe3d1a8ec9 Mon Sep 17 00:00:00 2001 From: mathiascode Date: Thu, 7 Jan 2021 09:50:06 +0200 Subject: [PATCH] Remove ProtocolLib dependency Time will tell if this patch is still necessary or not. --- src/main/java/pw/kaboom/extras/Main.java | 17 ----------------- src/main/resources/plugin.yml | 1 - 2 files changed, 18 deletions(-) diff --git a/src/main/java/pw/kaboom/extras/Main.java b/src/main/java/pw/kaboom/extras/Main.java index 5312661..367889a 100644 --- a/src/main/java/pw/kaboom/extras/Main.java +++ b/src/main/java/pw/kaboom/extras/Main.java @@ -6,12 +6,6 @@ import org.bukkit.Bukkit; import org.bukkit.block.BlockFace; import org.bukkit.plugin.java.JavaPlugin; -import com.comphenix.protocol.PacketType; -import com.comphenix.protocol.ProtocolLibrary; -import com.comphenix.protocol.events.ListenerPriority; -import com.comphenix.protocol.events.PacketAdapter; -import com.comphenix.protocol.events.PacketEvent; - import pw.kaboom.extras.commands.CommandBroadcastVanilla; import pw.kaboom.extras.commands.CommandClearChat; import pw.kaboom.extras.commands.CommandConsole; @@ -80,17 +74,6 @@ public final class Main extends JavaPlugin { this.getCommand("tellraw").setExecutor(new CommandTellraw()); this.getCommand("username").setExecutor(new CommandUsername()); - ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Client.WINDOW_CLICK) { - @Override - public void onPacketReceiving(final PacketEvent event) { - final int maxInventorySize = 46; - if (event.getPacket().getIntegers().read(1) > maxInventorySize - || event.getPacket().getIntegers().read(1) < 0) { - event.setCancelled(true); - } - } - }); - /* Block-related modules */ this.getServer().getPluginManager().registerEvents(new BlockCheck(), this); this.getServer().getPluginManager().registerEvents(new BlockPhysics(), this); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 71aabc4..8aba82f 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,6 @@ name: Extras main: pw.kaboom.extras.Main description: Plugin that adds extra functionality to the server. -softdepend: [ProtocolLib] api-version: 1.13 version: master