private void onCommandForward(CommandSender invoker, ByteArrayDataInput dataInput) { ForwardMessage message = new ForwardMessage(); message.readFrom(dataInput); if (message.isOP() && message.isSource()) { //bukkit op and it won't run as bungee console invoker.addGroups(plugin.getName() + "-OP"); } String line = message.getCommandName() + ' ' + message.getArgs(); if (message.isSource()) { //the player is the actual invoker other it's the console ProxyServer.getInstance().getPluginManager().dispatchCommand(invoker, line); } else { CommandSender console = ProxyServer.getInstance().getConsole(); ProxyServer.getInstance().getPluginManager().dispatchCommand(console, line); } } }