From e10eaf9b66a11eff8138b291b6b483276ae4f75b Mon Sep 17 00:00:00 2001 From: Ruakij Date: Tue, 11 May 2021 11:02:30 +0200 Subject: [PATCH] Fix system trying to gather non-existent data to display message --- .../linkedBeaconTeleporter/LinkedBeaconTeleporterBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterBlock.java b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterBlock.java index 04b2489..bdab86e 100644 --- a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterBlock.java +++ b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterBlock.java @@ -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()