Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
f75efee1ab
Commit
35aa984d17
@ -54,7 +54,7 @@ import java.util.stream.Collectors;
|
||||
public class SimulatorStorage implements Enable, Disable {
|
||||
|
||||
public static final World WORLD = Bukkit.getWorlds().get(0);
|
||||
private final File simulatorsDir = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "simulators");
|
||||
private static final File simulatorsDir = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "simulators");
|
||||
|
||||
private static NamespacedKey simulatorSelection = SWUtils.getNamespaceKey("simulator_selection");
|
||||
|
||||
@ -99,7 +99,14 @@ public class SimulatorStorage implements Enable, Disable {
|
||||
}
|
||||
|
||||
public static void delete(String name) {
|
||||
tntSimulators.remove(name);
|
||||
TNTSimulator tntSimulator = tntSimulators.remove(name);
|
||||
if (tntSimulator != null) {
|
||||
tntSimulator.getPlayerShowMode().forEach((player, simulatorEntityShowMode) -> {
|
||||
SimulatorCursor.hide(player, tntSimulator);
|
||||
});
|
||||
tntSimulator.hide();
|
||||
}
|
||||
new File(simulatorsDir, name + ".simulator").delete();
|
||||
}
|
||||
|
||||
public static void removeSimulator(ItemStack itemStack) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren