Possible fix for AsyncPlayerChatEvent exception.

This commit is contained in:
Boosik 2013-04-04 14:54:15 +02:00
parent 1c09117813
commit 07eda3c245
2 changed files with 3 additions and 0 deletions

View File

@ -114,6 +114,9 @@ public class boosCoolDownListener implements Listener {
String temp = "globalchat";
double price = 0;
Player player = event.getPlayer();
if (!boosConfigManager.getCommands(player).contains("globalchat")){
return;
}
int cooldownTime = boosConfigManager.getCoolDown(temp, player);
if (chatMessage.startsWith("!")) {
if (!boosCoolDownManager.checkCoolDownOK(player, temp, temp,