First of all I have some problems in my Scoreboard Plugin, For example: If I join LocalHost Server(IP): Plugin really works well(no flash occurs in) but, otherwise, If I join connected domains(IP).. then I getting some flash every-time when I moving around the world[X Y Z]
I think I should change codes of "PlayerMoveEvent" and I knew ping difference makes flashing.. and It seems flash occur in MOVEMENT section.. in my opinions
Again, Every-time changing Player Location.. then got flashing every-seconds
I really wanna get feedbacks!
If you need MORE DETAILS Here(Video) : https://youtu.be/rKO36Lw73rc
...
public class ScoreSidebar implements Listener {
public static void main(String[] args) {
}
@EventHandler
public void onPlayerJoinBoard(@NotNull PlayerJoinEvent event) {
createBoard(event.getPlayer());
}
@EventHandler
public void PlayerMoveEvent(@NotNull PlayerMoveEvent event) {
createBoard(event.getPlayer());
}
public void createBoard(@NotNull Player player) {
ScoreboardManager manager = Bukkit.getScoreboardManager();
assert manager != null;
Scoreboard board = manager.getNewScoreboard();
Objective o = board.registerNewObjective("Scores", "dummy", ChatColor.AQUA + "§lSTATUS");
o.setDisplaySlot(DisplaySlot.SIDEBAR);
Score score5 = o.getScore(" ");
score5.setScore(6);
Score score4 = o.getScore(ChatColor.YELLOW + "PLAYER: " +
ChatColor.BOLD + Bukkit.getOnlinePlayers().size() + ChatColor.WHITE + "/명");
score4.setScore(5);
Score score3 = o.getScore(ChatColor.GOLD + "MOVEMENT: " +
ChatColor.WHITE + player.getLocation().getBlockX() + " " + player.getLocation().getBlockY()
+ " " + player.getLocation().getBlockZ() + "");
score3.setScore(4);
// Stream Location
Score score2 = o.getScore(ChatColor.GRAY + " " + " X | Y | Z ");
score2.setScore(3);
Score score1 = o.getScore("");
score1.setScore(2);
Score score = o.getScore(ChatColor.GRAY + "uhm... ");
score.setScore(1);
player.setScoreboard(board);
}
}