|
|
@ -31,6 +31,15 @@ public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
|
|
|
|
e.setDropItems(false);
|
|
|
|
e.setDropItems(false);
|
|
|
|
e.setExpToDrop(0);
|
|
|
|
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
|
|
|
|
// Remove from list
|
|
|
|
this.linkedBeaconTeleporters.remove(this);
|
|
|
|
this.linkedBeaconTeleporters.remove(this);
|
|
|
|
// TODO: Remove from placedLBTsById when empty?
|
|
|
|
// TODO: Remove from placedLBTsById when empty?
|
|
|
@ -50,15 +59,6 @@ public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
|
|
|
|
lbtItem.item()
|
|
|
|
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;
|
|
|
|
return lbtItem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|