Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
54c8d2dc3f
Commit
e42bee62d3
@ -75,8 +75,8 @@ public class TNTSimulator {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveAndDelete() {
|
public void save() {
|
||||||
TNTSimulator simulator = TNT_SIMULATOR_MAP.remove(player);
|
TNTSimulator simulator = TNT_SIMULATOR_MAP.get(player);
|
||||||
YAPIONArray yapionArray = new YAPIONArray();
|
YAPIONArray yapionArray = new YAPIONArray();
|
||||||
simulator.spawns.forEach(tntSpawn -> {
|
simulator.spawns.forEach(tntSpawn -> {
|
||||||
yapionArray.add(tntSpawn.output());
|
yapionArray.add(tntSpawn.output());
|
||||||
@ -90,6 +90,11 @@ public class TNTSimulator {
|
|||||||
simulator.hide();
|
simulator.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void saveAndDelete() {
|
||||||
|
save();
|
||||||
|
TNT_SIMULATOR_MAP.remove(player);
|
||||||
|
}
|
||||||
|
|
||||||
public void delete() {
|
public void delete() {
|
||||||
TNTSimulator simulator = TNT_SIMULATOR_MAP.remove(player);
|
TNTSimulator simulator = TNT_SIMULATOR_MAP.remove(player);
|
||||||
WorldData.getSimulatorData().remove(SteamwarUser.get(player.getUniqueId()).getId() + "");
|
WorldData.getSimulatorData().remove(SteamwarUser.get(player.getUniqueId()).getId() + "");
|
||||||
|
@ -147,7 +147,7 @@ public class TNTSimulatorListener implements Listener, Disable {
|
|||||||
@Override
|
@Override
|
||||||
public void disable() {
|
public void disable() {
|
||||||
for (TNTSimulator simulator : TNTSimulator.TNT_SIMULATOR_MAP.values()) {
|
for (TNTSimulator simulator : TNTSimulator.TNT_SIMULATOR_MAP.values()) {
|
||||||
simulator.saveAndDelete();
|
simulator.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren