org.inventivetalent.packetlistener.handler.PacketHandler Java Examples
The following examples show how to use
org.inventivetalent.packetlistener.handler.PacketHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PacketListenerAPI.java From PacketListenerAPI with MIT License | 5 votes |
@Override public void disable(Plugin plugin) { if (!injected) { return;//Not enabled } logger.info("Removing channels for online players..."); for (Player player : Bukkit.getOnlinePlayers()) { channelInjector.removeChannel(player); } logger.info("Removing packet handlers (" + PacketHandler.getHandlers().size() + ")..."); while (!PacketHandler.getHandlers().isEmpty()) { PacketHandler.removeHandler(PacketHandler.getHandlers().get(0)); } }
Example #2
Source File: NickNamerAPI.java From NickNamer with MIT License | 5 votes |
@Override public void init(Plugin plugin) { APIManager.initAPI(PacketListenerAPI.class); APIManager.registerEvents(this, this); nickManager = new SimpleNickManager(plugin); // uuidResolver = new UUIDResolver(plugin, 3600000/* 1 hour */); PacketHandler.addHandler(packetListener = new PacketListener(plugin)); }
Example #3
Source File: NickNamerAPI.java From NickNamer with MIT License | 4 votes |
@Override public void disable(Plugin plugin) { PacketHandler.removeHandler(packetListener); APIManager.disableAPI(PacketListenerAPI.class); }
Example #4
Source File: PacketListener.java From MapManager with MIT License | 4 votes |
protected void disable() { PacketHandler.removeHandler(this.packetHandler); }
Example #5
Source File: PacketListenerAPI.java From PacketListenerAPI with MIT License | 2 votes |
/** * @param handler PacketHandler to add * @return <code>true</code> if the handler was added * @see PacketHandler#addHandler(PacketHandler) */ public static boolean addPacketHandler(PacketHandler handler) { return PacketHandler.addHandler(handler); }
Example #6
Source File: PacketListenerAPI.java From PacketListenerAPI with MIT License | 2 votes |
/** * @param handler PacketHandler to remove * @return <code>true</code> if the handler was removed * @see PacketHandler#removeHandler(PacketHandler) */ public static boolean removePacketHandler(PacketHandler handler) { return PacketHandler.removeHandler(handler); }