Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
31f04ef07b
Commit
7c79b47d61
@ -53,6 +53,12 @@ public class StoredRecords {
|
||||
}, 1, 1);
|
||||
}
|
||||
|
||||
static void cleanup(Player player) {
|
||||
isolatedTNT.forEach((region, playerListMap) -> playerListMap.remove(player));
|
||||
replayTime.forEach((region, playerIntegerMap) -> playerIntegerMap.remove(player));
|
||||
replayLoops.forEach((region, playerIntegerMap) -> playerIntegerMap.remove(player));
|
||||
}
|
||||
|
||||
public static void add(Region region, Record record) {
|
||||
records.computeIfAbsent(region, k -> new ArrayList<>()).add(record);
|
||||
}
|
||||
|
@ -161,13 +161,12 @@ public class TraceShowManager implements Listener {
|
||||
@EventHandler
|
||||
public void onLeave(PlayerQuitEvent event) {
|
||||
Region region = Region.getRegion(event.getPlayer().getLocation());
|
||||
if (region.isGlobal()) {
|
||||
return;
|
||||
if (!region.isGlobal()) {
|
||||
Map<Player, ShowMode<TNTPosition>> regionalShowModes = showModes.get(region);
|
||||
if (regionalShowModes != null) {
|
||||
regionalShowModes.remove(event.getPlayer());
|
||||
}
|
||||
}
|
||||
Map<Player, ShowMode<TNTPosition>> regionalShowModes = showModes.get(region);
|
||||
if (regionalShowModes == null) {
|
||||
return;
|
||||
}
|
||||
regionalShowModes.remove(event.getPlayer());
|
||||
StoredRecords.cleanup(event.getPlayer());
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren