Fix isEmpty check in ColoredText

This commit is contained in:
LeoDog896 2021-01-15 13:26:12 -05:00
parent 8633797420
commit 3514547610
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ import java.util.regex.Pattern;
public class ColoredText extends JsonMessage {
// the raw text
private StringBuilder message = new StringBuilder();
private final StringBuilder message = new StringBuilder();
/**
* Creates a colored text.
@ -160,7 +160,7 @@ public class ColoredText extends JsonMessage {
protected List<JsonObject> getComponents() {
final List<JsonObject> objects = new ArrayList<>();
// No message, return empty list
if (message.isEmpty())
if (getMessage().isEmpty())
return objects;
boolean inFormat = false;

View File

@ -58,6 +58,7 @@ public class CommandDispatcher {
* @param commandString the command (containing the command name and the args if any)
* @return the result of the parsing, null if the command doesn't exist
*/
@Nullable
public CommandResult parse(@NotNull String commandString) {
commandString = commandString.trim();

View File

@ -7,7 +7,6 @@ import net.minestom.server.instance.Instance;
import net.minestom.server.utils.BlockPosition;
import org.jetbrains.annotations.NotNull;
import java.util.Map;
import java.util.Random;
public class EatBlockGoal extends GoalSelector {