Bukkit Task

java
Etzelia 2018-09-17 22:39:57 -05:00
parent 20b2c7891b
commit 94f91a175f
2 changed files with 11 additions and 1 deletions

View File

@ -132,6 +132,14 @@
</archive> </archive>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -51,7 +51,9 @@ public class CommandListenerThread extends Thread {
Bukkit.getConsoleSender().sendMessage("Arguments '" + args.toString() + "'"); Bukkit.getConsoleSender().sendMessage("Arguments '" + args.toString() + "'");
} }
if (commands.contains(base)) { if (commands.contains(base)) {
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), buf); Bukkit.getScheduler().runTask(plugin, () -> {
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), buf);
});
} else if (this.plugin.getConfig().getBoolean("verbose")){ } else if (this.plugin.getConfig().getBoolean("verbose")){
Bukkit.getConsoleSender().sendMessage("Input not recognized, ignoring."); Bukkit.getConsoleSender().sendMessage("Input not recognized, ignoring.");
} }