Check for command message setting being empty

This commit is contained in:
fullwall 2020-10-21 15:18:07 +08:00
parent a944c3ca9c
commit cac35409c9

View File

@ -243,7 +243,9 @@ public class CommandTrait extends Trait {
private void sendErrorMessage(Player player, CommandTraitMessages msg, Object... objects) {
String messageRaw = msg.setting.asString();
Messaging.send(player, Translator.format(messageRaw, objects));
if (messageRaw != null && messageRaw.trim().length() > 0) {
Messaging.send(player, Translator.format(messageRaw, objects));
}
}
public void setCost(double cost) {