forked from SteamWar/SteamWar
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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user