From 1fe12c06fdfb4ef21fe024ce8c8e80c389cf582d Mon Sep 17 00:00:00 2001 From: Chris Naude Date: Sat, 12 Mar 2016 09:10:11 -0700 Subject: [PATCH] Vanilla command workaround for MC 1.9. --- .../java/com/cnaude/purpleirc/CommandQueueWatcher.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cnaude/purpleirc/CommandQueueWatcher.java b/src/main/java/com/cnaude/purpleirc/CommandQueueWatcher.java index 93b6013..f9cc9aa 100644 --- a/src/main/java/com/cnaude/purpleirc/CommandQueueWatcher.java +++ b/src/main/java/com/cnaude/purpleirc/CommandQueueWatcher.java @@ -61,10 +61,13 @@ public class CommandQueueWatcher { isCommandBookCommand = plugin.commandBookHook.isCommandBookCommand(cmd); plugin.logDebug("Is this is a CommandBook command? " + Boolean.toString(isCommandBookCommand)); } - if (plugin.getServer().getVersion().contains("MC: 1.8") + if ((plugin.getServer().getVersion().contains("MC: 1.8") && plugin.getServer().getVersion().contains("Spigot") && plugin.getServer().getPluginCommand(cmd) == null - && !isCommandBookCommand) { + && !isCommandBookCommand) + || (plugin.getServer().getVersion().contains("MC: 1.9") + && plugin.getServer().getPluginCommand(cmd) == null + && !isCommandBookCommand)) { plugin.logDebug("Dispatching command as ConsoleSender: " + ircCommand.getGameCommand()); plugin.getServer().dispatchCommand(ircCommand.getIRCConsoleCommandSender(), ircCommand.getGameCommand());