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

View File

@ -308,6 +308,11 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
} }
this.saveMVConfig(); this.saveMVConfig();
// Register async or sync player chat according to config // 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()) { if (getMVConfig().getUseAsyncChat()) {
this.chatListener = new MVAsyncPlayerChatListener(this, this.playerListener); this.chatListener = new MVAsyncPlayerChatListener(this, this.playerListener);
} else { } else {