@EventHandler(priority = EventPriority.MONITOR) public void processCommands(RemoteServerCommandEvent evt) { if (evt.isCancelled() || evt.isAsynchronous()) return; Command cmd = CommandFactory.commands.get(evt.getCommand()); if (cmd == null || cmd instanceof PlayerOnly) return; cmd.run(evt.getSender()); }
@Deprecated // Moved to TFM_TelnetListener @EventHandler(priority = EventPriority.NORMAL) public void onRemoteServerCommand(RemoteServerCommandEvent event) { if (TFM_CommandBlocker.getInstance().isCommandBlocked(event.getCommand(), event.getSender())) { event.setCommand(""); } }
@EventHandler public void onRemoteServerCommand(RemoteServerCommandEvent e) { handleCommand(e.getSender(), e.getCommand().toLowerCase(), e); }