From 38285d4221a733b11b20d59943ff33df0eb95fb3 Mon Sep 17 00:00:00 2001 From: gnembon Date: Sat, 17 Apr 2021 00:29:13 -0300 Subject: [PATCH] running functions will cause them not track the commandsource. fixes #815 --- .../java/carpet/script/utils/FixedCommandSource.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/carpet/script/utils/FixedCommandSource.java b/src/main/java/carpet/script/utils/FixedCommandSource.java index 939cb9d2..beb5e566 100644 --- a/src/main/java/carpet/script/utils/FixedCommandSource.java +++ b/src/main/java/carpet/script/utils/FixedCommandSource.java @@ -37,7 +37,7 @@ public class FixedCommandSource extends ServerCommandSource public FixedCommandSource(ServerCommandSource original, Vec3d pos, Value[] error, List chatOutput) { super(CommandOutput.DUMMY, pos, Vec2f.ZERO, original.getWorld(), CarpetSettings.runPermissionLevel, - original.getName(), original.getDisplayName(), original.getMinecraftServer(), original.getEntity(), true, + original.getName(), original.getDisplayName(), original.getMinecraftServer(), original.getEntity(), false, (ctx, succ, res) -> { }, EntityAnchorArgumentType.EntityAnchor.FEET); position = pos; world = original.getWorld(); @@ -80,11 +80,9 @@ public class FixedCommandSource extends ServerCommandSource return this; } - @Override - public ServerCommandSource withSilent() - { - return this; - } + //@Override // only used in fuctions and we really don't care to track these actually, besides the basic output + // also other overrides target ONLY execute command, which withSilent doesn't care bout. + //public ServerCommandSource withSilent() { return this; } @Override public ServerCommandSource withLevel(int level)