How to make a Spigot 1.15+ plugin (Ep23) Scoreboards

  Рет қаралды 25,244

CodedRed

CodedRed

Күн бұрын

Пікірлер: 34
@bratuhazpolski7590
@bratuhazpolski7590 4 жыл бұрын
hi CodedRed I just want to tell you: the explanation and your voice is really nice. subscribed
@Lockface77
@Lockface77 4 жыл бұрын
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 :)
@mcpp5947
@mcpp5947 4 жыл бұрын
Great video I’ve learned a lot from you. Thank you!!!
@zdany_
@zdany_ 2 жыл бұрын
How can i refresh the scoreboard every second?
@dariosarubbi3129
@dariosarubbi3129 4 жыл бұрын
Man, these tutorials really helps
@ssyntqx
@ssyntqx 4 жыл бұрын
Great video! Just wondering maybe a tutorial on how to make a custom enchant that digs a 3x3 area?
@magdilein6484
@magdilein6484 3 жыл бұрын
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(...).
@gaabyy2444
@gaabyy2444 4 жыл бұрын
Hi, in command block "bellow name" is in the tablist. Like the player's health in UHC games ! :D
@temporaly6272
@temporaly6272 4 жыл бұрын
For some reason event onJoin is called twice even if I registered it once.
@kadarfelix
@kadarfelix 3 жыл бұрын
Thanks for the tutorial! You are a goodest!
@thenottanman7345
@thenottanman7345 4 жыл бұрын
It didn't pop up when I did /pl and didn't work at all
@bastiluki5078
@bastiluki5078 4 жыл бұрын
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.
@itr1x420
@itr1x420 3 жыл бұрын
Hi do this work on 1.12.2?
@pastafied
@pastafied 4 жыл бұрын
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
@SteampunkSammy
@SteampunkSammy 4 жыл бұрын
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
@gepps4263
@gepps4263 4 жыл бұрын
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?
@darthtoc4645
@darthtoc4645 4 жыл бұрын
same, you found a fix?
@SteampunkSammy
@SteampunkSammy 4 жыл бұрын
@@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
@moritz7574
@moritz7574 4 жыл бұрын
Great Video :D
@mcpp5947
@mcpp5947 4 жыл бұрын
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.
@JaydenLikesPigs
@JaydenLikesPigs 4 жыл бұрын
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
@SocialExperimentOfficial
@SocialExperimentOfficial 3 жыл бұрын
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%
@rogerenand5835
@rogerenand5835 3 жыл бұрын
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-decierdo6625
@gilbeysgemar-decierdo6625 4 жыл бұрын
can i put the mob kills in a bukkit runnable
@SteampunkSammy
@SteampunkSammy 4 жыл бұрын
yes
@paulus_de_gross5996
@paulus_de_gross5996 4 жыл бұрын
Hey, nice Video, BUT, i can do what i want, i cannot see the Scoreboard, can anyone help me out, pls
@latin_idk
@latin_idk 4 жыл бұрын
hey codedred can you make a plugin tutorial on how to make a kitpvp plugin :D
@frostingly3687
@frostingly3687 4 жыл бұрын
he just makes tutorials for stuff that can be used to create better plugins he wont make every single plugin
@beastbomber2316
@beastbomber2316 3 жыл бұрын
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
@jackeyboy6508
@jackeyboy6508 3 жыл бұрын
thanks!
@finngutmann9511
@finngutmann9511 4 жыл бұрын
the code board.registerNewObjective is outdated !!
@CodedRed
@CodedRed 4 жыл бұрын
Make sure to use the correct number of parameters.
@NerdAimz295
@NerdAimz295 3 жыл бұрын
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_
@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
How to make a Spigot 1.15+ plugin (Ep24) Animated Scoreboards
17:48
Minecraft Scoreboard Command Tutorial [1.18]
6:07
Legitimoose
Рет қаралды 407 М.
«Жат бауыр» телехикаясы І 30 - бөлім | Соңғы бөлім
52:59
Qazaqstan TV / Қазақстан Ұлттық Арнасы
Рет қаралды 340 М.
Jaidarman TOP / Жоғары лига-2023 / Жекпе-жек 1-ТУР / 1-топ
1:30:54
Counter-Strike 2 - Новый кс. Cтарый я
13:10
Marmok
Рет қаралды 2,8 МЛН
Advanced Spigot Coding | Custom Mobs | (Ep. 1) Spigot 1.15
31:40
I Beat Minecraft From One Grass Block
35:27
Beppo
Рет қаралды 6 МЛН
Ep13. Hypixel Scoreboard (No Flicker) - Minecraft Plugin Development
13:50
Blazingly Fast Greedy Mesher - Voxel Engine Optimizations
23:35
Never Use The Spigot Scoreboard API Again!
10:07
Jordan Osterberg
Рет қаралды 15 М.
Scoreboards - Spigot Plugin Development (2022)
8:15
Worn Off Keys
Рет қаралды 8 М.
Can I 100% Superliminal and Get a Refund?
23:36
Gronf
Рет қаралды 351 М.
«Жат бауыр» телехикаясы І 30 - бөлім | Соңғы бөлім
52:59
Qazaqstan TV / Қазақстан Ұлттық Арнасы
Рет қаралды 340 М.