mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-12 19:30:42 +01:00
Fix isEmpty check in ColoredText
This commit is contained in:
parent
8633797420
commit
3514547610
@ -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;
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user