From 686ad312c5fb91be8a1bfd0a6626ab7970c6fc83 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 11 May 2021 09:53:57 +0200 Subject: [PATCH] Removed upcasting, check is done on reference-layer anyways --- .../LinkedBeaconTeleporters/listener/OnCustomPlayerMove.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/listener/OnCustomPlayerMove.java b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/listener/OnCustomPlayerMove.java index ee6e703..6d1784d 100644 --- a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/listener/OnCustomPlayerMove.java +++ b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/listener/OnCustomPlayerMove.java @@ -69,8 +69,7 @@ public class OnCustomPlayerMove implements CustomPlayerMoveEventListener { // Get first partner thats not our current-block LinkedBeaconTeleporterBlock lbtBlockPartner = null; for(LinkedBeaconTeleporter lbtBlockTmp: lbtBlock.linkedBeaconTeleporters()){ - // Upcast as linked-Teleporters are only blocks anyways - if((LinkedBeaconTeleporterBlock)lbtBlockTmp != lbtBlock){ + if(lbtBlockTmp != lbtBlock){ lbtBlockPartner = (LinkedBeaconTeleporterBlock)lbtBlockTmp; break; }