Initial work to Scoreboard rewrite

This commit is contained in:
Fabrizio La Rosa 2020-07-13 13:33:48 +02:00
parent a58782cb0a
commit 5142c0015a
4 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,4 @@
package com.songoda.skyblock.scoreboard.wip;
public class Board {
}

View File

@ -0,0 +1,16 @@
package com.songoda.skyblock.scoreboard.wip;
import org.bukkit.scheduler.BukkitRunnable;
public class Driver extends BukkitRunnable {
public Driver(String board) {
}
@Override
public void run() {
}
public void setDefault(boolean isDefault) {
}
}

View File

@ -0,0 +1,24 @@
package com.songoda.skyblock.scoreboard.wip;
import com.songoda.skyblock.SkyBlock;
import java.util.Map;
public class Manager {
Map<String, Driver> drivers;
public void newDriver(String board, boolean isDefault) {
Driver driver = new Driver(board);
driver.runTaskTimerAsynchronously(SkyBlock.getInstance(), 1L, 1L);
drivers.put(board, driver);
driver.setDefault(isDefault);
}
public void clearDrivers()
{
for(Driver driver : drivers.values())
driver.cancel();
drivers.clear();
}
}

View File

@ -0,0 +1,4 @@
package com.songoda.skyblock.scoreboard.wip;
public class Row {
}