Fixed broken if-statements
This commit is contained in:
parent
2f64eb5ed0
commit
bf18c82d6d
@ -31,6 +31,15 @@ public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
|
||||
e.setDropItems(false);
|
||||
e.setExpToDrop(0);
|
||||
|
||||
// Notify Player when link was destroyed
|
||||
if(this.linkedBeaconTeleporters.size()-1 < 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()
|
||||
)
|
||||
+" Blocks away) §cdestroyed");
|
||||
}
|
||||
|
||||
// Remove from list
|
||||
this.linkedBeaconTeleporters.remove(this);
|
||||
// TODO: Remove from placedLBTsById when empty?
|
||||
@ -50,15 +59,6 @@ public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
|
||||
lbtItem.item()
|
||||
);
|
||||
|
||||
// Notify Player when link was destroyed
|
||||
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()
|
||||
)
|
||||
+" Blocks away) §cdestroyed");
|
||||
}
|
||||
|
||||
return lbtItem;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ public class LinkedBeaconTeleporterItem extends LinkedBeaconTeleporter {
|
||||
);
|
||||
|
||||
// Notify Player when no other teleporter was found (yet?)
|
||||
if(this.linkedBeaconTeleporters.size() == 2){
|
||||
if(this.linkedBeaconTeleporters.size() == 1){
|
||||
e.getPlayer().sendMessage("§6No other Teleporter found with with id §7"+ this.teleporterId);
|
||||
}
|
||||
// Notify Player when we have a full link
|
||||
|
Loading…
x
Reference in New Issue
Block a user