mirror of
https://github.com/kaboomserver/extras.git
synced 2025-01-09 07:57:10 +00:00
Remove ProtocolLib dependency
Time will tell if this patch is still necessary or not.
This commit is contained in:
parent
2c1cf457a3
commit
9594db67af
2 changed files with 0 additions and 18 deletions
|
@ -6,12 +6,6 @@ import org.bukkit.Bukkit;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
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.CommandBroadcastVanilla;
|
||||||
import pw.kaboom.extras.commands.CommandClearChat;
|
import pw.kaboom.extras.commands.CommandClearChat;
|
||||||
import pw.kaboom.extras.commands.CommandConsole;
|
import pw.kaboom.extras.commands.CommandConsole;
|
||||||
|
@ -80,17 +74,6 @@ public final class Main extends JavaPlugin {
|
||||||
this.getCommand("tellraw").setExecutor(new CommandTellraw());
|
this.getCommand("tellraw").setExecutor(new CommandTellraw());
|
||||||
this.getCommand("username").setExecutor(new CommandUsername());
|
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 */
|
/* Block-related modules */
|
||||||
this.getServer().getPluginManager().registerEvents(new BlockCheck(), this);
|
this.getServer().getPluginManager().registerEvents(new BlockCheck(), this);
|
||||||
this.getServer().getPluginManager().registerEvents(new BlockPhysics(), this);
|
this.getServer().getPluginManager().registerEvents(new BlockPhysics(), this);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
name: Extras
|
name: Extras
|
||||||
main: pw.kaboom.extras.Main
|
main: pw.kaboom.extras.Main
|
||||||
description: Plugin that adds extra functionality to the server.
|
description: Plugin that adds extra functionality to the server.
|
||||||
softdepend: [ProtocolLib]
|
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
version: master
|
version: master
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue