Should now detect Async chat availability for even better backwards compatibility.

This commit is contained in:
Jeremy Wood 2012-09-05 20:53:59 -04:00
parent a9f00a46f5
commit 3715bc8bc5
1 changed files with 5 additions and 0 deletions

View File

@ -308,6 +308,11 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
}
this.saveMVConfig();
// Register async or sync player chat according to config
try {
Class.forName("org.bukkit.event.player.AsyncPlayerChatEvent");
} catch (ClassNotFoundException e) {
getMVConfig().setUseAsyncChat(false);
}
if (getMVConfig().getUseAsyncChat()) {
this.chatListener = new MVAsyncPlayerChatListener(this, this.playerListener);
} else {