Jump to content

MInecraft plugin fuktioniert nicht


Recommended Posts

warum kann ich die Variable onlineZeitenS nicht unten im scoreboard benutzen bin neu

		Bukkit.getScheduler().scheduleSyncRepeatingTask(Main.getPlugin(), new Runnable() {
			int onlineZeitS = 0;
			int onlineZeitM = 0;
			public void run() {
				if(onlineZeitS >= 60) {
					onlineZeitM = 1;
					onlineZeitS -= 60;
		}, 0, 20);
		Scoreboard board = Bukkit.getScoreboardManager().getNewScoreboard();
		Objective objective = board.registerNewObjective("abcd", "abcd");
		objective.getScore(" ").setScore(4);
		objective.getScore("§aHallo §6" + player.getName() + "§a!").setScore(3);
		objective.getScore("§aViel Spaß auf dem Server!").setScore(2);
		objective.getScore("§du bist schon " + onlineZeiten);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...