Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.

Commit

Permalink
Vanilla command workaround for MC 1.9. #128.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnaude committed Mar 12, 2016
1 parent 8d2af48 commit a9da2c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions dependency-reduced-pom.xml
Expand Up @@ -135,6 +135,12 @@
<version>1.8.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>spigot-19</artifactId>
<version>1.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>spigot-184</artifactId>
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/cnaude/purpleirc/CommandQueueWatcher.java
Expand Up @@ -61,10 +61,12 @@ private void queueAndSend() {
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")
&& !isCommandBookCommand)) {
plugin.logDebug("Dispatching command as ConsoleSender: " + ircCommand.getGameCommand());

plugin.getServer().dispatchCommand(ircCommand.getIRCConsoleCommandSender(), ircCommand.getGameCommand());
Expand Down

0 comments on commit a9da2c3

Please sign in to comment.