From b81be4f5636f3aa56f71d80f5ac98a766129455a Mon Sep 17 00:00:00 2001 From: ChromaTK <117107593+ChromaTK@users.noreply.github.com> Date: Sun, 5 May 2024 00:00:31 -0400 Subject: [PATCH] Update PortalTeleportCheck.java --- .../com/playmonumenta/plugins/portals/PortalTeleportCheck.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/paper/src/main/java/com/playmonumenta/plugins/portals/PortalTeleportCheck.java b/plugins/paper/src/main/java/com/playmonumenta/plugins/portals/PortalTeleportCheck.java index 43e0eba33..47e07923d 100644 --- a/plugins/paper/src/main/java/com/playmonumenta/plugins/portals/PortalTeleportCheck.java +++ b/plugins/paper/src/main/java/com/playmonumenta/plugins/portals/PortalTeleportCheck.java @@ -194,7 +194,8 @@ private boolean portalEnterCheck(Player player, Portal portal) { return recentVelocity.getY() > 0.01; } else if (portal.mFacing == BlockFace.UP) { // Floor portals must be entered going downwards or level to the ground, not upwards - return recentVelocity.getY() < 0.01; + // Additionally, prevent player from teleporting if sneaking, to prevent being looped between two floor portals + return recentVelocity.getY() < 0.01 && !player.isSneaking(); } else { // Wall portals must be entered by going in their direction // To test this, check if the player would hit the portal if they kept going in the current direction