Fix Simulator.autoTrace

This commit is contained in:
2025-07-10 13:44:06 +02:00
parent 71238a0167
commit b86a26a709
3 changed files with 5 additions and 10 deletions
@@ -76,7 +76,7 @@ public class SimulatorCommand extends SWCommand {
@Register(value = "start", description = "SIMULATOR_START_HELP")
public void start(@Validator Player p, @ErrorMessage("SIMULATOR_NOT_EXISTS") Simulator simulator) {
SimulatorExecutor.run(p, simulator, () -> {});
SimulatorExecutor.run(p, simulator, null);
}
@Register(value = "rename", description = "SIMULATOR_RENAME_HELP")
@@ -367,7 +367,7 @@ public class SimulatorCursor implements Listener {
if (simulator == null) {
return;
}
SimulatorExecutor.run(event.getPlayer(), simulator, () -> {});
SimulatorExecutor.run(event.getPlayer(), simulator, null);
return;
}
@@ -25,12 +25,6 @@ import de.steamwar.bausystem.features.simulator.data.SimulatorGroup;
import de.steamwar.bausystem.features.tpslimit.TPSUtils;
import de.steamwar.bausystem.features.tracer.TraceRecorder;
import de.steamwar.bausystem.region.Region;
import de.steamwar.bausystem.region.RegionUtils;
import de.steamwar.bausystem.region.flags.Flag;
import de.steamwar.bausystem.region.flags.flagvalues.ColorMode;
import de.steamwar.bausystem.region.utils.RegionExtensionType;
import de.steamwar.bausystem.region.utils.RegionType;
import de.steamwar.bausystem.utils.PasteBuilder;
import de.steamwar.bausystem.utils.TickEndEvent;
import de.steamwar.bausystem.utils.TickStartEvent;
import de.steamwar.linkage.Linked;
@@ -43,7 +37,6 @@ import org.bukkit.event.Listener;
import java.util.*;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Level;
@Linked
@MinVersion(19)
@@ -91,7 +84,9 @@ public class SimulatorExecutor implements Listener {
});
}
onEnd.run();
if (onEnd != null) {
onEnd.run();
}
}
});