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()); }