From 2bda948c8fda17ac27a3e419b50f8d5ea17aac95 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 11 May 2021 09:37:10 +0200 Subject: [PATCH] Fixed CustomMoveEvent firing all the time instead of only on Block-change --- .../customPlayerMoveEvent/CustomPlayerMoveEventHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/customPlayerMoveEvent/CustomPlayerMoveEventHandler.java b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/customPlayerMoveEvent/CustomPlayerMoveEventHandler.java index 4dd3065..d95da8e 100644 --- a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/customPlayerMoveEvent/CustomPlayerMoveEventHandler.java +++ b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/customPlayerMoveEvent/CustomPlayerMoveEventHandler.java @@ -52,7 +52,9 @@ public class CustomPlayerMoveEventHandler { if(distance > 0) locationChangeListeners(e); } - else + else if(loc.getBlockX() != oldLoc.getBlockX() || + loc.getBlockY() != oldLoc.getBlockY() || + loc.getBlockZ() != oldLoc.getBlockZ()) locationChangeListeners(e); }