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 bdab86e..41aa58d 100644 --- a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterBlock.java +++ b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/linkedBeaconTeleporter/LinkedBeaconTeleporterBlock.java @@ -42,7 +42,13 @@ public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter { // Remove from list this.linkedBeaconTeleporters.remove(this); - // TODO: Remove from placedLBTsById when empty? + + if(this.linkedBeaconTeleporters.size() == 0){ + // List empty, delete from placedLBTsById + LinkedBeaconTeleporterManager.placedLBTsById.remove( + this.teleporterId + ); + } // Remove from loc LinkedBeaconTeleporterManager.placedLBTByLoc.remove(