Removed upcasting, check is done on reference-layer anyways

This commit is contained in:
Ruakij 2021-05-11 09:53:57 +02:00
parent 973897cc3e
commit 686ad312c5

View File

@ -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;
}