Delete list when empty

master
Ruakij 4 years ago
parent b20e0a03fd
commit 2a713d269e

@ -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(

Loading…
Cancel
Save