Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
5d1fb567ef
Commit
d9385691e4
@ -117,6 +117,10 @@ public class TNTSimulator {
|
|||||||
return tntSpawns;
|
return tntSpawns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
new ArrayList<>(tntElementList).forEach(this::remove);
|
||||||
|
}
|
||||||
|
|
||||||
public void remove(SimulatorElement element) {
|
public void remove(SimulatorElement element) {
|
||||||
if (element instanceof TNTElement) {
|
if (element instanceof TNTElement) {
|
||||||
TNTElement tntElement = (TNTElement) element;
|
TNTElement tntElement = (TNTElement) element;
|
||||||
|
@ -130,7 +130,7 @@ public class TNTSimulatorGui {
|
|||||||
inv.setItem(51, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("SIMULATOR_GUI_DELETE", player), clickType -> {
|
inv.setItem(51, new SWItem(Material.BARRIER, BauSystem.MESSAGE.parse("SIMULATOR_GUI_DELETE", player), clickType -> {
|
||||||
if (currentTntSimulator != null) {
|
if (currentTntSimulator != null) {
|
||||||
currentTntSimulator.getTntElementList().forEach(SimulatorElement::close);
|
currentTntSimulator.getTntElementList().forEach(SimulatorElement::close);
|
||||||
currentTntSimulator.getTntElementList().clear();
|
currentTntSimulator.clear();
|
||||||
player.closeInventory();
|
player.closeInventory();
|
||||||
} else {
|
} else {
|
||||||
TNTSimulator tntSimulator = SimulatorStorage.getSimulator(player);
|
TNTSimulator tntSimulator = SimulatorStorage.getSimulator(player);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren