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