Hey!
I'm currently trying to write a plugin, one of which's features is supposed to be showing a scoreboard every 30minutes with a score based on mob kills.
Most of this is not implemented yet but the update function, but I receive a Warning from IntelliJ in one of the lines for creating the scoreboard
More precisely the line
gives the following warning:
The Plugin is Paper for MC version 20.1
Edit:
Close this, I got it fixed. Display name needs to be a "net.kyori.adventure.text.Component"
I'm currently trying to write a plugin, one of which's features is supposed to be showing a scoreboard every 30minutes with a score based on mob kills.
Most of this is not implemented yet but the update function, but I receive a Warning from IntelliJ in one of the lines for creating the scoreboard
Code:
public class TimerHandler {
final String name_string = "mobBattle";
static final Criteria criteria = Criteria.DUMMY;
final String display_name_string = "Mob Battle";
void setupScoreboardDisplay() {
ScoreboardManager manager = Bukkit.getScoreboardManager();
final Scoreboard scoreboard = manager.getNewScoreboard();
final Objective objective = scoreboard.registerNewObjective(name_string, criteria, display_name_string);
[...]
}
}
Code:
final Objective objective = scoreboard.registerNewObjective(name_string, criteria, display_name_string);
Code:
'registerNewObjective(java.lang.@org.jetbrains.annotations.NotNull String, org.bukkit.scoreboard.@org.jetbrains.annotations.NotNull Criteria, java.lang.@org.jetbrains.annotations.NotNull String)' is deprecated
The Plugin is Paper for MC version 20.1
Edit:
Close this, I got it fixed. Display name needs to be a "net.kyori.adventure.text.Component"
Last edited: