From 4cfd7402a4c3c6d61031adfaaa19a12f6ee7d68f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Fri, 3 Mar 2023 17:04:21 +0100 Subject: [PATCH] Hotfix everything that does not work Signed-off-by: yoyosource --- .../src/de/steamwar/bausystem/BauSystem.java | 2 +- .../bausystem/features/detonator/DetonatorCommand.java | 2 +- .../features/detonator/DetonatorListener.java | 2 +- .../features/killchecker/KillcheckerCommand.java | 2 +- .../bausystem/features/script/variables/Constants.java | 4 ++++ .../bausystem/features/simulator/SimulatorCommand.java | 2 +- .../bausystem/features/simulator/SimulatorStorage.java | 2 +- .../features/simulator/TNTSimulatorListener.java | 2 +- .../bausystem/features/tracer/TraceCommand.java | 2 +- .../bausystem/features/tracer/record/Recorder.java | 10 +--------- .../steamwar/bausystem/features/warp/WarpCommand.java | 2 +- .../steamwar/bausystem/features/warp/WarpListener.java | 2 +- 12 files changed, 15 insertions(+), 19 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java index 1d1e6362..44ad2b3a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java @@ -94,7 +94,7 @@ public class BauSystem extends JavaPlugin implements Listener { @Override public void onDisable() { - LinkageUtils.unlink(); + // LinkageUtils.unlink(); WorldData.write(); Config.getInstance().saveAll(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java index bb71245d..f703729f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorCommand.java @@ -34,7 +34,7 @@ import org.bukkit.inventory.meta.ItemMeta; import java.util.Arrays; -@Linked +// @Linked public class DetonatorCommand extends SWCommand { public static ItemStack getWAND(Player player) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java index be8e8ce9..f0ced4e5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/detonator/DetonatorListener.java @@ -38,7 +38,7 @@ import org.bukkit.event.player.PlayerSwapHandItemsEvent; import java.util.HashSet; import java.util.Set; -@Linked +// @Linked public class DetonatorListener implements Listener { static final Set HAS_UPDATED = new HashSet<>(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerCommand.java index fee15416..74fae22f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/killchecker/KillcheckerCommand.java @@ -37,7 +37,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -@Linked +// @Linked public class KillcheckerCommand extends SWCommand implements Listener { private Map visualizers = new HashMap<>(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java index e0ec0872..576a8fc1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/variables/Constants.java @@ -171,6 +171,7 @@ public class Constants { static { CONSTANTS.put("trace", player -> { + if (true) return new ConstantBooleanValue(() -> false); Region region = Region.getRegion(player.getLocation()); if (region.isGlobal()) { return new ConstantBooleanValue(() -> false); @@ -178,6 +179,7 @@ public class Constants { return new ConstantBooleanValue(() -> Recorder.INSTANCE.get(region) instanceof ActiveTracer); }); CONSTANTS.put("autotrace", player -> { + if (true) return new ConstantBooleanValue(() -> false); Region region = Region.getRegion(player.getLocation()); if (region.isGlobal()) { return new ConstantBooleanValue(() -> false); @@ -185,10 +187,12 @@ public class Constants { return new ConstantBooleanValue(() -> Recorder.INSTANCE.get(region) instanceof AutoTraceRecorder); }); CONSTANTS.put("trace_status", player -> { + if (true) return new ConstantStringValue(() -> ""); TraceRecorder recorder = Recorder.INSTANCE.get(Region.getRegion(player.getLocation())); return new ConstantStringValue(recorder::scriptState); }); CONSTANTS.put("trace_time", player -> { + if (true) return new ConstantLongValue(() -> 0L); TraceRecorder recorder = Recorder.INSTANCE.get(Region.getRegion(player.getLocation())); return new ConstantLongValue(recorder::scriptTime); }); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java index 640d0360..c4462dc9 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java @@ -35,7 +35,7 @@ import org.bukkit.inventory.ItemStack; import java.util.Collection; -@Linked +// @Linked public class SimulatorCommand extends SWCommand { public SimulatorCommand() { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java index a549e0a2..5103136a 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java @@ -48,7 +48,7 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -@Linked +// @Linked public class SimulatorStorage implements Enable, Disable { public static final World WORLD = Bukkit.getWorlds().get(0); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java index 48285d78..df76dc5b 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulatorListener.java @@ -35,7 +35,7 @@ import org.bukkit.inventory.PlayerInventory; import java.util.function.Function; -@Linked +// @Linked public class TNTSimulatorListener implements Listener { private boolean permissionCheck(Player player) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java index b24ec012..a3c3cc71 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/TraceCommand.java @@ -43,7 +43,7 @@ import java.util.function.BiFunction; import java.util.function.Supplier; import java.util.stream.Collectors; -@Linked +// @Linked public class TraceCommand extends SWCommand { public TraceCommand() { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/Recorder.java b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/Recorder.java index 2d74492d..7e037875 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/Recorder.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/tracer/record/Recorder.java @@ -39,7 +39,7 @@ import org.bukkit.event.entity.EntitySpawnEvent; import java.util.*; import java.util.stream.Collectors; -@Linked +// @Linked public class Recorder implements Listener { public static Recorder INSTANCE; @@ -108,14 +108,6 @@ public class Recorder implements Listener { } private static final DisabledTracerRecorder DISABLED = new DisabledTracerRecorder(); - static Recorder instance; - - { - instance = this; - } - - private final World world = Bukkit.getWorlds().get(0); - private Map regionTraceRecorderMap = new HashMap<>(); private Map tntTraceRecorderMap = new HashMap<>(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java index cf44f51f..ac21b447 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpCommand.java @@ -40,7 +40,7 @@ import yapion.hierarchy.types.YAPIONObject; import java.util.ArrayList; -@Linked +// @Linked public class WarpCommand extends SWCommand implements Disable, Enable { private static final String[] FORBIDDEN_NAMES = new String[]{ diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java index 953d709a..fa040556 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java @@ -38,7 +38,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -@Linked +// @Linked public class WarpListener implements Listener { private Map warpEntityServer = new HashMap<>();