SteamWar/BauSystem2.0
Archiviert
12
0

Add copy and testblock point to WarpListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-07-28 16:17:30 +02:00
Ursprung 5d8bd398ec
Commit c706f85254

Datei anzeigen

@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.warp;
import de.steamwar.bausystem.linkage.LinkageType;
import de.steamwar.bausystem.linkage.Linked;
import de.steamwar.bausystem.region.Region;
import de.steamwar.bausystem.utils.NMSWrapper;
import org.bukkit.*;
import org.bukkit.entity.Player;
@ -87,6 +88,13 @@ public class WarpListener implements Listener {
Warp.getWarps().forEach(warp -> {
locations.put(warp.getName(), warp.getLocation());
});
Region region = Region.getRegion(p.getLocation());
if (region.getCopyPoint() != null) {
locations.put("Copy", region.getCopyPoint().toLocation(p).add(0.5, 0, 0.5));
}
if (region.getTestBlockPoint() != null) {
locations.put("TestBlock", region.getTestBlockPoint().toLocation(p).add(0.5, 0, 0.5));
}
}
locations.forEach((name, location) -> {