Solved Custom scoreboard plugin not showing up in-game

Discussion in 'Spigot Plugin Development' started by xSwiftZx, Apr 1, 2020.

  1. drives_a_ford

    Moderator

    First of all, this is not a resource. Remove the tag.

    As the error suggests:
    Caused by: java.lang.NoSuchMethodError: org.bukkit.scoreboard.Scoreboard.registerNewObjective(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/bukkit/scoreboard/Objective;
    You're attempting to use a method that does not exist at at ScoreboadPlugin.Events.EventsClass.joinServer(EventsClass.java:24) ~[?:?].

    You're most likely compiling the plugin against a version different than what you're using in game.
     
  2. So how should i fix it
     
  3. drives_a_ford

    Moderator

  4. wdym by compile it against the same version my server is on 1.8.9 and i have spigot on 1.8.8,
    also dont understand what the link u sent was sorry im kinda new to this.
     
    #5 xSwiftZx, Apr 1, 2020
    Last edited: Apr 1, 2020
  5. drives_a_ford

    Moderator

    If your dependency was the same version as the one you're using, you'd get an error in your IDE as well as at compile time.

    The link I added showed the method that you can use. Note the amount of arguments and compare to your own.

    And if you've not been able to understand still, then this:
    Means the problem is in EventsClass on line 24.
     
  6. I got this error do u know what this means or how to fix it: java.lang.NoSuchMethodError: org.bukkit.scoreboard.Scoreboard.registerNewObjective(Ljava/lang/String;Ljava/lang/String;Ljava/lang/StringLorg/bukkit/scoreboard/Objective;
     
  7.  
  8. how do i check the correct version i’m supposed to run it on
     
  9. server that youre compiling against means the server version that you imported into your IDE, either through build pathing or a dependency manager like maven.
     
  10. my actual server is on 1.8.9 i’m not sure ab my code tho
     
  11. youre building against a higher version so theres methods available in your IDE that arent on your server. thats waht the error means. your server is more outdated to what youre building against
     
  12. how would i fix it i sent my code above
     
  13. it has nothing to do with your code. it depends on how you imported the spigot api into your ide. did you use build pathing or a dependency manager like gradle or maven?
     
  14. I have eclipse and all i did was edit the build path to the spigot.jar this is my build paths there
    upload_2020-4-1_11-14-37.png
     
  15. drives_a_ford

    Moderator

    You can clearly see in just the image that the dependency you're using is 1.15.2.

     
  16. im using 1.8.8 now and it still giving me the same error
    upload_2020-4-1_13-59-46.png
     
  17. You have to take the spigot - 1.15.2.jar out
     
  18. I removed it and that was the problem it now works thank you to everyone that helped.