Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
2dd5e16bda
Commit
1086808cf0
@ -88,12 +88,20 @@ public class TNTSimulator {
|
||||
}
|
||||
|
||||
public void show(Player player) {
|
||||
entityServer.addPlayer(player);
|
||||
players.add(player);
|
||||
if (!players.contains(player)) {
|
||||
entityServer.addPlayer(player);
|
||||
players.add(player);
|
||||
}
|
||||
}
|
||||
|
||||
public void hide(Player player) {
|
||||
entityServer.removePlayer(player);
|
||||
if (players.contains(player)) {
|
||||
entityServer.removePlayer(player);
|
||||
players.remove(player);
|
||||
}
|
||||
}
|
||||
|
||||
void _hide(Player player) {
|
||||
players.remove(player);
|
||||
}
|
||||
|
||||
|
@ -88,6 +88,9 @@ public class TNTSimulatorListener implements Listener {
|
||||
@EventHandler
|
||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||
SimulatorCursor.hide(event.getPlayer(), null);
|
||||
SimulatorStorage.getSimulatorNames().forEach(s -> {
|
||||
SimulatorStorage.getSimulator(s)._hide(event.getPlayer());
|
||||
});
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren