mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-25 20:16:06 +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();
|
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user