13
0

Update Portals debug infos!
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2024-07-22 12:30:44 +02:00
Ursprung 8f1f267ad7
Commit 7bc43cc6d2
6 geänderte Dateien mit 28 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -101,4 +101,9 @@ public class CommandPortal implements PortalHandler {
public void delete() {
// Nothing to remove
}
@Override
public String toString() {
return "Command: /" + command;
}
}

Datei anzeigen

@ -53,4 +53,9 @@ public class DummyPortal implements PortalHandler {
public void delete() {
// Delets nothing
}
@Override
public String toString() {
return "Dummy";
}
}

Datei anzeigen

@ -236,4 +236,9 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
return "Programmierfehler";
}
}
@Override
public String toString() {
return "Fightserver";
}
}

Datei anzeigen

@ -91,6 +91,7 @@ public class Portal implements PortalHandler, ConfigurationSerializable {
private final Hologram debugPos1;
private final Hologram debugPos2;
private final Hologram debugPos3;
public Portal(Map<String, Object> map) {
this(
@ -128,6 +129,7 @@ public class Portal implements PortalHandler, ConfigurationSerializable {
this.debugPos1 = new Hologram(null, pos1, id + " POS1", true);
this.debugPos2 = new Hologram(null, pos2, id + " POS2", true);
this.debugPos3 = new Hologram(null, pos1.clone().add(pos2).toVector().divide(new Vector(2, 2, 2)).toLocation(pos1.getWorld()), handler.toString(), true);
portals.put(id, this);
perChunk(minChunkX, maxChunkX, minChunkZ, maxChunkZ).forEach(coords -> chunkPortals.computeIfAbsent(coords, coords1 -> new ArrayList<>()).add(this));
@ -196,6 +198,7 @@ public class Portal implements PortalHandler, ConfigurationSerializable {
public void delete() {
debugPos1.delete();
debugPos2.delete();
debugPos3.delete();
handler.delete();
perChunk(minChunkX, maxChunkX, minChunkZ, maxChunkZ).forEach(coords -> chunkPortals.getOrDefault(coords, new ArrayList<>()).remove(this));
portals.remove(id);

Datei anzeigen

@ -49,4 +49,9 @@ public class StackPortal extends TeleportPortal {
public String getText() {
return text;
}
@Override
public String toString() {
return "Stack";
}
}

Datei anzeigen

@ -101,4 +101,9 @@ public class TeleportPortal implements PortalHandler {
portals.remove(this);
portals.forEach(p -> p.sources.remove(this));
}
@Override
public String toString() {
return "Teleport: " + target;
}
}