From c706f85254550a0300e11b01909eb78c35682fb9 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 28 Jul 2022 16:17:30 +0200 Subject: [PATCH] Add copy and testblock point to WarpListener Signed-off-by: yoyosource --- .../de/steamwar/bausystem/features/warp/WarpListener.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 587580f2..01f5a5fa 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/warp/WarpListener.java @@ -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) -> {