Merge branch 'master' into 1.17
# Conflicts: # src/main/java/carpet/network/ServerNetworkHandler.java # src/main/java/carpet/script/utils/SnoopyCommandSource.java
This commit is contained in:
commit
709d74ea47
4 files changed
+112
-140
No files matched your search
@@ -669,13 +669,17 @@ public class Auxiliary {
|
||||
ServerCommandSource s = ((CarpetContext)c).s;
|
||||
try
|
||||
{
|
||||
Value[] error = {Value.NULL};
|
||||
List<Value> output = new ArrayList<>();
|
||||
Text[] error = {null};
|
||||
List<Text> output = new ArrayList<>();
|
||||
Value retval = new NumericValue(s.getMinecraftServer().getCommandManager().execute(
|
||||
new SnoopyCommandSource(s, posf, error, output),
|
||||
lv.get(0).evalValue(c).getString())
|
||||
);
|
||||
Value ret = ListValue.of(retval, ListValue.wrap(output), error[0]);
|
||||
Value ret = ListValue.of(
|
||||
retval,
|
||||
ListValue.wrap(output.stream().map(FormattedTextValue::new).collect(Collectors.toList())),
|
||||
FormattedTextValue.of(error[0])
|
||||
);
|
||||
return (c_, t_) -> ret;
|
||||
}
|
||||
catch (Exception exc)
|
||||
|
||||
Reference in new issue
Block a user