hi CodedRed I just want to tell you: the explanation and your voice is really nice. subscribed
@Lockface774 жыл бұрын
Awesome tutorial! I would suggest that you use more "final" variables, since for example je variable "obj" will never be assigned again you can do final Objective obj = ... Which is better :)
@mcpp59474 жыл бұрын
Great video I’ve learned a lot from you. Thank you!!!
@zdany_2 жыл бұрын
How can i refresh the scoreboard every second?
@dariosarubbi31294 жыл бұрын
Man, these tutorials really helps
@ssyntqx4 жыл бұрын
Great video! Just wondering maybe a tutorial on how to make a custom enchant that digs a 3x3 area?
@magdilein64843 жыл бұрын
Thanks for the tutorial! I've tried this for minecraft version 1.18 and I had to swap the two Strings "dummy" and the name, in your case "HubScoreboard-1", inside the method registerNewObjective(...).
@gaabyy24444 жыл бұрын
Hi, in command block "bellow name" is in the tablist. Like the player's health in UHC games ! :D
@temporaly62724 жыл бұрын
For some reason event onJoin is called twice even if I registered it once.
@kadarfelix3 жыл бұрын
Thanks for the tutorial! You are a goodest!
@thenottanman73454 жыл бұрын
It didn't pop up when I did /pl and didn't work at all
@bastiluki50784 жыл бұрын
I get a NullPointerException at Scoreboard board = manager.getNewScoreboard(); Version: 1.16.1 I don't know if the version is causing this bug. i know how to read stack traces but i don't know how to fix this one. If you can help me fix this I am thankful.
@itr1x4203 жыл бұрын
Hi do this work on 1.12.2?
@pastafied4 жыл бұрын
is there a way that you could put the amount of players in survival mode on the scoreboard? im making a game where when people die they are put in spectator and i need to show how many are still alive
@SteampunkSammy4 жыл бұрын
Keep a variable as the count, on player join, on player leave and PlayerGameModeChangeEvent, set your variable to 0 Loop through players, and if gamemode is survival add one to your var after loop set your score Could optimise the above by checking who left/joined and what gamemode they were or what gm they changed to and just add or minus from your var instead of recounting
@gepps42634 жыл бұрын
Amazing video! I have a question though. I wrote a line that shows you how many deaths you have, but it only updates when you leave and join the server again. Is there any quick fixes for this?
@darthtoc46454 жыл бұрын
same, you found a fix?
@SteampunkSammy4 жыл бұрын
@@darthtoc4645 register an event on deaths, in that event get the scoreboard from the player, get the scores, find the one you made, set its score to update it. But if the objective is tracking the correct 'deaths' criteria then you should be fine already
@moritz75744 жыл бұрын
Great Video :D
@mcpp59474 жыл бұрын
Please when you're free can you make a tutorial of how to add effects to a user wearing armor with a certain type of lore. For example if a piece of armor has the lore "Grants Night Vision" they would get night vision permanently till the armor is taken off or is broken.
@JaydenLikesPigs4 жыл бұрын
hey man i know its a bit late, i love practicing code and if you still need help i think i could help, my discord is, JaydenIsAPig#1349
@SocialExperimentOfficial3 жыл бұрын
Great tutorial! I’m just curious how you would code a papi extension to show a players score value on a vanilla scoreboard objective. So like /papi parse me %my_coins%
@rogerenand58353 жыл бұрын
Hey. I love your videos. I know you probably won't see this but if you do, i would love for you to teach how to implement luckperms with the scoreboard to get the user group.
@gilbeysgemar-decierdo66254 жыл бұрын
can i put the mob kills in a bukkit runnable
@SteampunkSammy4 жыл бұрын
yes
@paulus_de_gross59964 жыл бұрын
Hey, nice Video, BUT, i can do what i want, i cannot see the Scoreboard, can anyone help me out, pls
@latin_idk4 жыл бұрын
hey codedred can you make a plugin tutorial on how to make a kitpvp plugin :D
@frostingly36874 жыл бұрын
he just makes tutorials for stuff that can be used to create better plugins he wont make every single plugin
@beastbomber23163 жыл бұрын
I setup these 3 functions for you guys to use in your scoreboards public int getDistanceTraveled(Player ply) //All 1 cm statistics except for fall and climb added together. { int Aviate = ply.getStatistic(Statistic.AVIATE_ONE_CM); int Crouch = ply.getStatistic(Statistic.CROUCH_ONE_CM); int Fly = ply.getStatistic(Statistic.FLY_ONE_CM); int Horse = ply.getStatistic(Statistic.HORSE_ONE_CM); int Minecart = ply.getStatistic(Statistic.MINECART_ONE_CM); int Pig = ply.getStatistic(Statistic.PIG_ONE_CM); int Sprint = ply.getStatistic(Statistic.SPRINT_ONE_CM); int Strider = ply.getStatistic(Statistic.STRIDER_ONE_CM); int Swim = ply.getStatistic(Statistic.SWIM_ONE_CM); int WalkOnWater = ply.getStatistic(Statistic.WALK_ON_WATER_ONE_CM); int Walk = ply.getStatistic(Statistic.WALK_ONE_CM); int WalkUnderWater = ply.getStatistic(Statistic.WALK_UNDER_WATER_ONE_CM); return Aviate + Crouch + Fly + Horse + Minecart + Pig + Sprint + Strider + Swim + WalkOnWater + Walk + WalkUnderWater; } public String distanceShorten(int distance) { float meter = distance / 100; float kilometer = distance / 100000; if(meter < 1) { return distance + "Cm"; } else if(kilometer < 1) { return meter + "M"; } else { return kilometer + "Km"; } } public ChatColor getChatColor(String type, Player ply) { switch (type) { case "online": { if(Bukkit.getOnlinePlayers().size() >= 0 && Bukkit.getOnlinePlayers().size() = 3 && Bukkit.getOnlinePlayers().size() = 11) { return ChatColor.GREEN; } } case "killsM": { if(ply.getStatistic(Statistic.MOB_KILLS) >= 0 && ply.getStatistic(Statistic.MOB_KILLS) = 26 && ply.getStatistic(Statistic.MOB_KILLS) = 101) { return ChatColor.GREEN; } } case "killsP": { if(ply.getStatistic(Statistic.PLAYER_KILLS) >= 0 && ply.getStatistic(Statistic.PLAYER_KILLS) = 6 && ply.getStatistic(Statistic.PLAYER_KILLS) = 26) { return ChatColor.GREEN; } } case "deaths": { if(ply.getStatistic(Statistic.DEATHS) >= 0 && ply.getStatistic(Statistic.DEATHS) = 11 && ply.getStatistic(Statistic.DEATHS) = 26) { return ChatColor.RED; } } case "traveled": { int distance = getDistanceTraveled(ply); if(distance >= 0 && distance = 8001 && distance = 26) { return ChatColor.GREEN; } } } return ChatColor.GRAY; } Id suggest using them like this Score score4 = obj.getScore(ChatColor.GOLD + "Online Players: " + getChatColor("online", player) + Bukkit.getOnlinePlayers().size()); score4.setScore(4); Score score5 = obj.getScore("Mob Kills: " + getChatColor("killsM", player) + player.getStatistic(Statistic.MOB_KILLS)); score5.setScore(5); Score score6 = obj.getScore("Player Kills: " + getChatColor("killsP", player) + player.getStatistic(Statistic.PLAYER_KILLS)); score6.setScore(6); Score score7 = obj.getScore("Deaths: " + getChatColor("deaths", player) + player.getStatistic(Statistic.DEATHS)); score7.setScore(7); int distanceTraveled = getDistanceTraveled(player); Score score8 = obj.getScore("Distance Traveled: " + getChatColor("distance", player) + distanceShorten(distanceTraveled)); score8.setScore(8); I havnt 100% tested this code so please reply any errors you get. Edit 1: Forgot to change statistics track
@jackeyboy65083 жыл бұрын
thanks!
@finngutmann95114 жыл бұрын
the code board.registerNewObjective is outdated !!
@CodedRed4 жыл бұрын
Make sure to use the correct number of parameters.
@NerdAimz2953 жыл бұрын
Super Thanks CodedRed you just helped me make my very own first plugin With on just one day U earn a sub and a like, btw how to create a config file to let other people edit the texts in the scoreboard lines? Please Respond Thanks!
@requenz_4 жыл бұрын
I copied you exactly. On the "score3" the "getScore" gets a line over it (think you call it overwritten, not sure tho) and turns gray, instead of green as it's supposed to. Also, still on score3, the next line which says "player.getStatistic(...", tells me it's wrong and wants to change it to either: "decrementStatistic" or "incrementStatistic". However, whenever I do that it says it's still wrong and wants to change back to either "decrementStatistic" or "getStatistic". Furthermore, you used "MOB_KILLS" on that line, but that didn't show for me and it doesn't register with the correct colors as if it is a legitimate value. Although, "Statistic.DEATH_COUNT" has the correct colors and doesn't sign any errors, but it still says I have to change the thing I just mentioned before and "getScore" still has a line over it. I would very much appreciate every help I could get to fix this. thanks