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() {
|
||||
TNTSimulator simulator = TNT_SIMULATOR_MAP.remove(player);
|
||||
public void save() {
|
||||
TNTSimulator simulator = TNT_SIMULATOR_MAP.get(player);
|
||||
YAPIONArray yapionArray = new YAPIONArray();
|
||||
simulator.spawns.forEach(tntSpawn -> {
|
||||
yapionArray.add(tntSpawn.output());
|
||||
@ -90,6 +90,11 @@ public class TNTSimulator {
|
||||
simulator.hide();
|
||||
}
|
||||
|
||||
public void saveAndDelete() {
|
||||
save();
|
||||
TNT_SIMULATOR_MAP.remove(player);
|
||||
}
|
||||
|
||||
public void delete() {
|
||||
TNTSimulator simulator = TNT_SIMULATOR_MAP.remove(player);
|
||||
WorldData.getSimulatorData().remove(SteamwarUser.get(player.getUniqueId()).getId() + "");
|
||||
|
@ -147,7 +147,7 @@ public class TNTSimulatorListener implements Listener, Disable {
|
||||
@Override
|
||||
public void disable() {
|
||||
for (TNTSimulator simulator : TNTSimulator.TNT_SIMULATOR_MAP.values()) {
|
||||
simulator.saveAndDelete();
|
||||
simulator.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren