From 633c182cfad83e4518fa47e5c1bd60eebd37b1e1 Mon Sep 17 00:00:00 2001 From: jojo Date: Fri, 8 Jan 2021 17:32:49 +0100 Subject: [PATCH] Fix Border with Enderpearl --- src/de/steamwar/lobby/listener/PlayerMoveListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/de/steamwar/lobby/listener/PlayerMoveListener.java b/src/de/steamwar/lobby/listener/PlayerMoveListener.java index 144f403..b41edab 100644 --- a/src/de/steamwar/lobby/listener/PlayerMoveListener.java +++ b/src/de/steamwar/lobby/listener/PlayerMoveListener.java @@ -41,6 +41,10 @@ public class PlayerMoveListener implements Listener { event.getPlayer().teleport(spawnLocation); return; } + if (event.getFrom().toVector().isInAABB(borderMinVector, borderMaxVector)) { + event.getPlayer().teleport(spawnLocation); + return; + } if (!to.toVector().isInAABB(borderMinVector, borderMaxVector)) { event.getPlayer().teleport(event.getFrom()); } -- 2.39.5