Fix DynamicRegionEditor

This commit is contained in:
2026-03-29 13:23:18 +02:00
parent b3d741d7b9
commit e7cd1f883b
@@ -149,6 +149,7 @@ public class DynamicRegionEditor implements SWPlayer.Component, Listener {
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)
public void onPlayerSwapHandItems(PlayerSwapHandItemsEvent event) { public void onPlayerSwapHandItems(PlayerSwapHandItemsEvent event) {
if (event.getPlayer() != player) return;
event.setCancelled(true); event.setCancelled(true);
List<SWListInv.SWListEntry<Type>> list = new ArrayList<>(); List<SWListInv.SWListEntry<Type>> list = new ArrayList<>();
@@ -193,6 +194,7 @@ public class DynamicRegionEditor implements SWPlayer.Component, Listener {
@EventHandler @EventHandler
public void onPlayerInteract(PlayerInteractEvent event) { public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getPlayer() != player) return;
Location startPos = player.getLocation().clone().add(0.0, player.getEyeHeight(), 0.0); Location startPos = player.getLocation().clone().add(0.0, player.getEyeHeight(), 0.0);
Vector direction = player.getLocation().getDirection(); Vector direction = player.getLocation().getDirection();
if (direction.getY() > 0) return; if (direction.getY() > 0) return;