diff --git a/src/main/java/me/melontini/commander/impl/expression/extensions/convert/LazyArrayWrapper.java b/src/main/java/me/melontini/commander/impl/expression/extensions/convert/LazyArrayWrapper.java index 0f74a19..a535693 100644 --- a/src/main/java/me/melontini/commander/impl/expression/extensions/convert/LazyArrayWrapper.java +++ b/src/main/java/me/melontini/commander/impl/expression/extensions/convert/LazyArrayWrapper.java @@ -37,6 +37,15 @@ protected EvaluationValue get(int index) { }; } + @Override + public String toString() { + StringJoiner joiner = new StringJoiner(", ", "[", "]"); + for (int i = 0; i < size; i++) { + joiner.add(String.valueOf(function.apply(i))); + } + return joiner.toString(); + } + @Override public EvaluationValue get(int index) { return ProxyMap.convert(this.function.apply(index)); diff --git a/src/main/java/me/melontini/commander/impl/expression/extensions/convert/nbt/NbtCompoundStruct.java b/src/main/java/me/melontini/commander/impl/expression/extensions/convert/nbt/NbtCompoundStruct.java index 5faf675..b5b1111 100644 --- a/src/main/java/me/melontini/commander/impl/expression/extensions/convert/nbt/NbtCompoundStruct.java +++ b/src/main/java/me/melontini/commander/impl/expression/extensions/convert/nbt/NbtCompoundStruct.java @@ -23,4 +23,9 @@ public EvaluationValue get(Object key) { if (!(key instanceof String s)) return EvaluationValue.nullValue(); return convert(compound.get(s)); } + + @Override + public String toString() { + return String.valueOf(compound); + } } diff --git a/src/main/java/me/melontini/commander/impl/expression/extensions/convert/states/StateStruct.java b/src/main/java/me/melontini/commander/impl/expression/extensions/convert/states/StateStruct.java index dfa1b74..5ff901d 100644 --- a/src/main/java/me/melontini/commander/impl/expression/extensions/convert/states/StateStruct.java +++ b/src/main/java/me/melontini/commander/impl/expression/extensions/convert/states/StateStruct.java @@ -28,4 +28,9 @@ public EvaluationValue get(Object key) { } return EvaluationValue.nullValue(); } + + @Override + public String toString() { + return String.valueOf(state.getEntries()); + } }