SteamWar/BauSystem2.0
Archiviert
12
0

Revert "Hotfix everything that does not work"
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

This reverts commit 4cfd7402a4.
Dieser Commit ist enthalten in:
yoyosource 2023-03-03 17:10:45 +01:00
Ursprung 4cfd7402a4
Commit 43f1ecc985
12 geänderte Dateien mit 19 neuen und 15 gelöschten Zeilen

Datei anzeigen

@ -94,7 +94,7 @@ public class BauSystem extends JavaPlugin implements Listener {
@Override @Override
public void onDisable() { public void onDisable() {
// LinkageUtils.unlink(); LinkageUtils.unlink();
WorldData.write(); WorldData.write();
Config.getInstance().saveAll(); Config.getInstance().saveAll();

Datei anzeigen

@ -34,7 +34,7 @@ import org.bukkit.inventory.meta.ItemMeta;
import java.util.Arrays; import java.util.Arrays;
// @Linked @Linked
public class DetonatorCommand extends SWCommand { public class DetonatorCommand extends SWCommand {
public static ItemStack getWAND(Player player) { public static ItemStack getWAND(Player player) {

Datei anzeigen

@ -38,7 +38,7 @@ import org.bukkit.event.player.PlayerSwapHandItemsEvent;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
// @Linked @Linked
public class DetonatorListener implements Listener { public class DetonatorListener implements Listener {
static final Set<Player> HAS_UPDATED = new HashSet<>(); static final Set<Player> HAS_UPDATED = new HashSet<>();

Datei anzeigen

@ -37,7 +37,7 @@ import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
// @Linked @Linked
public class KillcheckerCommand extends SWCommand implements Listener { public class KillcheckerCommand extends SWCommand implements Listener {
private Map<Region, KillcheckerVisualizer> visualizers = new HashMap<>(); private Map<Region, KillcheckerVisualizer> visualizers = new HashMap<>();

Datei anzeigen

@ -171,7 +171,6 @@ public class Constants {
static { static {
CONSTANTS.put("trace", player -> { CONSTANTS.put("trace", player -> {
if (true) return new ConstantBooleanValue(() -> false);
Region region = Region.getRegion(player.getLocation()); Region region = Region.getRegion(player.getLocation());
if (region.isGlobal()) { if (region.isGlobal()) {
return new ConstantBooleanValue(() -> false); return new ConstantBooleanValue(() -> false);
@ -179,7 +178,6 @@ public class Constants {
return new ConstantBooleanValue(() -> Recorder.INSTANCE.get(region) instanceof ActiveTracer); return new ConstantBooleanValue(() -> Recorder.INSTANCE.get(region) instanceof ActiveTracer);
}); });
CONSTANTS.put("autotrace", player -> { CONSTANTS.put("autotrace", player -> {
if (true) return new ConstantBooleanValue(() -> false);
Region region = Region.getRegion(player.getLocation()); Region region = Region.getRegion(player.getLocation());
if (region.isGlobal()) { if (region.isGlobal()) {
return new ConstantBooleanValue(() -> false); return new ConstantBooleanValue(() -> false);
@ -187,12 +185,10 @@ public class Constants {
return new ConstantBooleanValue(() -> Recorder.INSTANCE.get(region) instanceof AutoTraceRecorder); return new ConstantBooleanValue(() -> Recorder.INSTANCE.get(region) instanceof AutoTraceRecorder);
}); });
CONSTANTS.put("trace_status", player -> { CONSTANTS.put("trace_status", player -> {
if (true) return new ConstantStringValue(() -> "");
TraceRecorder recorder = Recorder.INSTANCE.get(Region.getRegion(player.getLocation())); TraceRecorder recorder = Recorder.INSTANCE.get(Region.getRegion(player.getLocation()));
return new ConstantStringValue(recorder::scriptState); return new ConstantStringValue(recorder::scriptState);
}); });
CONSTANTS.put("trace_time", player -> { CONSTANTS.put("trace_time", player -> {
if (true) return new ConstantLongValue(() -> 0L);
TraceRecorder recorder = Recorder.INSTANCE.get(Region.getRegion(player.getLocation())); TraceRecorder recorder = Recorder.INSTANCE.get(Region.getRegion(player.getLocation()));
return new ConstantLongValue(recorder::scriptTime); return new ConstantLongValue(recorder::scriptTime);
}); });

Datei anzeigen

@ -35,7 +35,7 @@ import org.bukkit.inventory.ItemStack;
import java.util.Collection; import java.util.Collection;
// @Linked @Linked
public class SimulatorCommand extends SWCommand { public class SimulatorCommand extends SWCommand {
public SimulatorCommand() { public SimulatorCommand() {

Datei anzeigen

@ -48,7 +48,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
// @Linked @Linked
public class SimulatorStorage implements Enable, Disable { public class SimulatorStorage implements Enable, Disable {
public static final World WORLD = Bukkit.getWorlds().get(0); public static final World WORLD = Bukkit.getWorlds().get(0);

Datei anzeigen

@ -35,7 +35,7 @@ import org.bukkit.inventory.PlayerInventory;
import java.util.function.Function; import java.util.function.Function;
// @Linked @Linked
public class TNTSimulatorListener implements Listener { public class TNTSimulatorListener implements Listener {
private boolean permissionCheck(Player player) { private boolean permissionCheck(Player player) {

Datei anzeigen

@ -43,7 +43,7 @@ import java.util.function.BiFunction;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
// @Linked @Linked
public class TraceCommand extends SWCommand { public class TraceCommand extends SWCommand {
public TraceCommand() { public TraceCommand() {

Datei anzeigen

@ -39,7 +39,7 @@ import org.bukkit.event.entity.EntitySpawnEvent;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
// @Linked @Linked
public class Recorder implements Listener { public class Recorder implements Listener {
public static Recorder INSTANCE; public static Recorder INSTANCE;
@ -108,6 +108,14 @@ public class Recorder implements Listener {
} }
private static final DisabledTracerRecorder DISABLED = new DisabledTracerRecorder(); private static final DisabledTracerRecorder DISABLED = new DisabledTracerRecorder();
static Recorder instance;
{
instance = this;
}
private final World world = Bukkit.getWorlds().get(0);
private Map<Region, TraceRecorder> regionTraceRecorderMap = new HashMap<>(); private Map<Region, TraceRecorder> regionTraceRecorderMap = new HashMap<>();
private Map<TNTPrimed, Region> tntTraceRecorderMap = new HashMap<>(); private Map<TNTPrimed, Region> tntTraceRecorderMap = new HashMap<>();

Datei anzeigen

@ -40,7 +40,7 @@ import yapion.hierarchy.types.YAPIONObject;
import java.util.ArrayList; import java.util.ArrayList;
// @Linked @Linked
public class WarpCommand extends SWCommand implements Disable, Enable { public class WarpCommand extends SWCommand implements Disable, Enable {
private static final String[] FORBIDDEN_NAMES = new String[]{ private static final String[] FORBIDDEN_NAMES = new String[]{

Datei anzeigen

@ -38,7 +38,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
// @Linked @Linked
public class WarpListener implements Listener { public class WarpListener implements Listener {
private Map<Player, REntityServer> warpEntityServer = new HashMap<>(); private Map<Player, REntityServer> warpEntityServer = new HashMap<>();