mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-27 10:31:51 +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 {
|
public class ColoredText extends JsonMessage {
|
||||||
|
|
||||||
// the raw text
|
// the raw text
|
||||||
private StringBuilder message = new StringBuilder();
|
private final StringBuilder message = new StringBuilder();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a colored text.
|
* Creates a colored text.
|
||||||
@ -160,7 +160,7 @@ public class ColoredText extends JsonMessage {
|
|||||||
protected List<JsonObject> getComponents() {
|
protected List<JsonObject> getComponents() {
|
||||||
final List<JsonObject> objects = new ArrayList<>();
|
final List<JsonObject> objects = new ArrayList<>();
|
||||||
// No message, return empty list
|
// No message, return empty list
|
||||||
if (message.isEmpty())
|
if (getMessage().isEmpty())
|
||||||
return objects;
|
return objects;
|
||||||
|
|
||||||
boolean inFormat = false;
|
boolean inFormat = false;
|
||||||
|
@ -58,6 +58,7 @@ public class CommandDispatcher {
|
|||||||
* @param commandString the command (containing the command name and the args if any)
|
* @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
|
* @return the result of the parsing, null if the command doesn't exist
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
public CommandResult parse(@NotNull String commandString) {
|
public CommandResult parse(@NotNull String commandString) {
|
||||||
commandString = commandString.trim();
|
commandString = commandString.trim();
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ import net.minestom.server.instance.Instance;
|
|||||||
import net.minestom.server.utils.BlockPosition;
|
import net.minestom.server.utils.BlockPosition;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class EatBlockGoal extends GoalSelector {
|
public class EatBlockGoal extends GoalSelector {
|
||||||
|
Loading…
Reference in New Issue
Block a user