Fix system trying to gather non-existent data to display message

This commit is contained in:
Ruakij 2021-05-11 11:02:30 +02:00
parent 686ad312c5
commit e10eaf9b66

View File

@ -32,7 +32,7 @@ public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
e.setExpToDrop(0);
// Notify Player when link was destroyed
if(this.linkedBeaconTeleporters.size()-1 != 2){
if(this.linkedBeaconTeleporters.size() == 2){
e.getPlayer().sendMessage("§cConnection to Teleporter with id §7"+ this.teleporterId +" §e("+
(int)((LinkedBeaconTeleporterBlock)this.linkedBeaconTeleporters.get(0)).block.getLocation().distance(
((LinkedBeaconTeleporterBlock)this.linkedBeaconTeleporters.get(1)).block().getLocation()