mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-25 12:05:14 +01:00
Should now detect Async chat availability for even better backwards compatibility.
This commit is contained in:
parent
a9f00a46f5
commit
3715bc8bc5
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user