Refactor Leaderboard to Kotlin, leveraging Exposed library for database operations, and update LeaderboardManager for compatibility.

Signed-off-by: Chaoscaot <max@maxsp.de>
This commit is contained in:
2025-11-11 17:39:39 +01:00
parent 5f7c5f0a18
commit d0c1413ea6
3 changed files with 98 additions and 75 deletions
@@ -50,7 +50,7 @@ public class LeaderboardManager implements Listener {
this.server = server;
this.configKey = configKey;
this.location = location;
Bukkit.getPluginManager().registerEvents(this, LobbySystem.getPlugin());
Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance());
update();
}
@@ -63,7 +63,7 @@ public class LeaderboardManager implements Listener {
for (int i = 0; i < leaderboard.size(); i++) {
Leaderboard entry = leaderboard.get(i);
RArmorStand entity = new RArmorStand(server, location.clone().add(0, (leaderboard.size() - i - 1) * 0.32, 0), RArmorStand.Size.MARKER);
SteamwarUser user = SteamwarUser.byId(entry.user);
SteamwarUser user = SteamwarUser.byId(entry.getUser());
String color = "§7";
if (i == 0) {
color = "§6§l";