SteamWar/MissileWars
Archiviert
13
0

Fix memory leak
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2024-08-03 17:48:29 +02:00
Ursprung 38475d75ec
Commit 09a1859979

Datei anzeigen

@ -25,6 +25,7 @@ import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Scoreboard;
@ -78,6 +79,11 @@ class FightScoreboard implements Listener {
});
}
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) {
SWScoreboard.removeScoreboard(event.getPlayer());
}
static Scoreboard getScoreboard() {
return scoreboard;
}