So how to make count up scoreboard with java? When you execute command "/countup" you get scoreboard where is count up like 00:01, 00:02, 00:03 etc. When you execute "/countup clear" that clear time and wipe your scoreboard.
That is all what I got: Code (Text): public class MatchTimer extends BukkitRunnable { private int time; public static boolean paused; public void timer() { this.runTaskTimer(Main.getPlugin(Main.class), 0, 20); System.out.println("[email protected]"); } public static void setPaused(boolean value) { paused = value; } @Override public void run() { if (!paused) { System.out.println("[email protected]"); if (time != 0) { time++; System.out.println(time); } System.out.println("not paused"); } else { System.out.println("paused"); } } }
What you have to do is now update the scoreboard with the time. You can either use advanced and use teams > https://www.spigotmc.org/wiki/making-scoreboard-with-teams-no-flicker/#wikiContent Or use basic and use scores. https://bukkit.org/threads/tutorial-scoreboards-teams-with-the-bukkit-api.139655/
Because your timer is not even complete... https://hub.spigotmc.org/javadocs/spigot/org/bukkit/scheduler/BukkitRunnable.html