Implement Linkage for LobbySystem

This commit is contained in:
2025-10-03 13:23:33 +02:00
parent 22d1e15ae0
commit 33b606060a
37 changed files with 111 additions and 111 deletions
@@ -136,7 +136,7 @@ public class BoatRace implements EventListener, Listener {
// boat.setBoatType(Boat.Type.values()[new Random().nextInt(Boat.Type.values().length)]);
boat.addPassenger(player);
bossBar = Bukkit.createBossBar("", BarColor.BLUE, BarStyle.SOLID);
task = Bukkit.getScheduler().runTaskTimer(LobbySystem.getPlugin(), () -> {
task = Bukkit.getScheduler().runTaskTimer(LobbySystem.getInstance(), () -> {
hasBacked = false;
if (nextCheckpoint != 0) {
double kmh = lastDistance * 20 * 3.6;
@@ -144,7 +144,7 @@ public class BoatRace implements EventListener, Listener {
bossBar.setTitle(LobbySystem.getMessage().parse("BOAT_RACE_TITLE", player, nextCheckpoint, renderTime(System.currentTimeMillis() - startTime), (int) kmh));
}
}, 0, 1);
Bukkit.getPluginManager().registerEvents(this, LobbySystem.getPlugin());
Bukkit.getPluginManager().registerEvents(this, LobbySystem.getInstance());
}
private boolean inRegion(Player p, Location loc1, Location loc2) {