From 22e52292387378a106e26d496d403d9a300e56bb Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 16 Jul 2018 16:20:26 +1000 Subject: [PATCH] Standardise empty string as null / not set --- src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java index da2d070efa..9b62ed436f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -139,7 +139,7 @@ public final class CraftChatMessage { } public static IChatBaseComponent fromStringOrNull(String message) { - return (message == null) ? null : fromString(message)[0]; + return (message == null || message.isEmpty()) ? null : fromString(message)[0]; } public static IChatBaseComponent[] fromString(String message) {