Fix messages having a prefix even when disabled

This commit is contained in:
Esophose 2020-12-02 22:56:28 -07:00
parent 91e1e81ccd
commit ee5b9ba7f1

View file

@ -128,7 +128,11 @@ public class LocaleManager extends Manager {
if (!Setting.MESSAGES_ENABLED.getBoolean()) if (!Setting.MESSAGES_ENABLED.getBoolean())
return; return;
this.sendParsedMessage(sender, this.getLocaleMessage("prefix") + this.getLocaleMessage(messageKey, stringPlaceholders)); String prefix = "";
if (Setting.USE_MESSAGE_PREFIX.getBoolean())
prefix = this.getLocaleMessage("prefix");
this.sendParsedMessage(sender, prefix + this.getLocaleMessage(messageKey, stringPlaceholders));
} }
/** /**
@ -142,7 +146,11 @@ public class LocaleManager extends Manager {
if (!Setting.MESSAGES_ENABLED.getBoolean()) if (!Setting.MESSAGES_ENABLED.getBoolean())
return; return;
this.sendParsedMessage(pplayer.getUnderlyingExecutor(), this.getLocaleMessage("prefix") + this.getLocaleMessage(messageKey, stringPlaceholders)); String prefix = "";
if (Setting.USE_MESSAGE_PREFIX.getBoolean())
prefix = this.getLocaleMessage("prefix");
this.sendParsedMessage(pplayer.getUnderlyingExecutor(), prefix + this.getLocaleMessage(messageKey, stringPlaceholders));
} }
/** /**