Remove ProtocolLib dependency

Time will tell if this patch is still necessary or not.
This commit is contained in:
mathiascode 2021-01-07 09:50:06 +02:00
parent 2c1cf457a3
commit 9594db67af
2 changed files with 0 additions and 18 deletions

View file

@ -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);

View file

@ -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