Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
ce8b4d8fa9
Commit
73bdfe28f1
@ -110,21 +110,18 @@ public class TNTSimulator {
|
||||
}
|
||||
|
||||
public void remove(SimulatorElement element) {
|
||||
tntElementList.remove(element);
|
||||
Set<SimulatorElement> toRemove = new HashSet<>();
|
||||
for (SimulatorElement spawn : tntElementList) {
|
||||
if (element instanceof TNTElement) {
|
||||
spawn.remove((TNTElement) element);
|
||||
}
|
||||
if (spawn instanceof TNTGroup) {
|
||||
if (((TNTGroup) spawn).getElements().isEmpty()) {
|
||||
toRemove.add(spawn);
|
||||
spawn.close();
|
||||
if (element instanceof TNTElement) {
|
||||
TNTElement tntElement = (TNTElement) element;
|
||||
element.remove(tntElement);
|
||||
if (tntElement.hasParent()) {
|
||||
tntElement.getParent().remove(tntElement);
|
||||
if (tntElement.getParent().getElements().isEmpty()) {
|
||||
remove(tntElement.getParent());
|
||||
}
|
||||
}
|
||||
}
|
||||
tntElementList.removeAll(toRemove);
|
||||
element.close();
|
||||
tntElementList.remove(element);
|
||||
}
|
||||
|
||||
public void change() {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren