Vanilla command workaround for MC 1.9.

This commit is contained in:
Chris Naude 2016-03-12 09:10:11 -07:00
parent dfb22860c1
commit 1fe12c06fd

View File

@ -61,10 +61,13 @@ public class CommandQueueWatcher {
isCommandBookCommand = plugin.commandBookHook.isCommandBookCommand(cmd); isCommandBookCommand = plugin.commandBookHook.isCommandBookCommand(cmd);
plugin.logDebug("Is this is a CommandBook command? " + Boolean.toString(isCommandBookCommand)); 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().getVersion().contains("Spigot")
&& plugin.getServer().getPluginCommand(cmd) == null && 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.logDebug("Dispatching command as ConsoleSender: " + ircCommand.getGameCommand());
plugin.getServer().dispatchCommand(ircCommand.getIRCConsoleCommandSender(), ircCommand.getGameCommand()); plugin.getServer().dispatchCommand(ircCommand.getIRCConsoleCommandSender(), ircCommand.getGameCommand());