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);
|
}, 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) {
|
public static void add(Region region, Record record) {
|
||||||
records.computeIfAbsent(region, k -> new ArrayList<>()).add(record);
|
records.computeIfAbsent(region, k -> new ArrayList<>()).add(record);
|
||||||
}
|
}
|
||||||
|
@ -161,13 +161,12 @@ public class TraceShowManager implements Listener {
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLeave(PlayerQuitEvent event) {
|
public void onLeave(PlayerQuitEvent event) {
|
||||||
Region region = Region.getRegion(event.getPlayer().getLocation());
|
Region region = Region.getRegion(event.getPlayer().getLocation());
|
||||||
if (region.isGlobal()) {
|
if (!region.isGlobal()) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
Map<Player, ShowMode<TNTPosition>> regionalShowModes = showModes.get(region);
|
Map<Player, ShowMode<TNTPosition>> regionalShowModes = showModes.get(region);
|
||||||
if (regionalShowModes == null) {
|
if (regionalShowModes != null) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
regionalShowModes.remove(event.getPlayer());
|
regionalShowModes.remove(event.getPlayer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
StoredRecords.cleanup(event.getPlayer());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren