change settings for better chat support

This commit is contained in:
Lennart ten Wolde 2016-02-25 00:03:52 +01:00
parent 9e434eb9a4
commit 9d86398936
2 changed files with 9 additions and 9 deletions

View file

@ -21,8 +21,8 @@ public class Settings<T> {
public static final Settings<Integer> COOLDOWN_KISS = new Settings<>("cooldown.kiss", 2);
public static final Settings<String> PM_FORMAT = new Settings<>("chat.pm-format", "&4{heart}&c{name}&4{heart} &7{message}");
public static final Settings<String> CHAT_FORMAT = new Settings<>("chat.chat-married-format", "&4&l<3 &r{original_format}");
public static final Settings<String> CHAT_PRIORITY = new Settings<>("chat.chat-priority", "HIGH");
public static final Settings<String> CHAT_FORMAT = new Settings<>("chat.status-format", "&4&l<3 ");
public static final Settings<Boolean> FORCE_FORMAT = new Settings<>("chat.force-status-format", true);
public static final Settings<Boolean> KISSES_ENABLED = new Settings<>("kisses.enabled", true);
public static final Settings<Integer> KISSES_AMOUNT_MIN = new Settings<>("kisses.amount-min", 5);

View file

@ -45,17 +45,17 @@ public class ChatListener implements Listener {
return;
}
if(Settings.CHAT_PRIORITY.value().toLowerCase().contains("high")) {
handleChat(event, mp);
}
// if(Settings.CHAT_PRIORITY.value().toLowerCase().contains("high")) {
// handleChat(event, mp);
// }
}
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerChatLate(AsyncPlayerChatEvent event) {
if(!Settings.CHAT_PRIORITY.value().toLowerCase().contains("low") || event.isCancelled()) return;
final Player player = event.getPlayer();
MPlayer mp = core.getMPlayer(player.getUniqueId());
handleChat(event, mp);
// if(!Settings.CHAT_PRIORITY.value().toLowerCase().contains("low") || event.isCancelled()) return;
// final Player player = event.getPlayer();
// MPlayer mp = core.getMPlayer(player.getUniqueId());
// handleChat(event, mp);
}
private void handleChat(AsyncPlayerChatEvent event, MPlayer mp) {