Solved MOTD plugin error

Discussion in 'Spigot Plugin Development' started by CreepersGamingMc, Jun 2, 2017.

  1. When I add the } after return true; I get no warnings or errors. And looking at the code there should be no problems after adding the }.
     
  2. Look
    1.jpg 2.jpg
     
  3. i recommend just using essentials motd : Essentials Folder> Motd> [text] || this makes it so people when they join get a specific message ||
     
  4. I'm coding it for release
     
  5. \
    the plugin you mean?
     
  6. Classes should be in uppercase (Main.java)
    Regarding your problem, your brackets are messed up.
    Make sure you're closing and opening them at the right place.
    It might be better to remake the class, and let eclipse's auto-bracket feature come in handy.
     
    • Agree Agree x 1
  7. It took me a VERY long time to make this plugin and to remake it would take a very long time
     
  8. You have added the bracket at the end of the file. That is not the good placement. You should add it after return true at the if statement that checks if the player has the permission to set the motd.

    You should be able to see this yourself as a developer. Learn how to fix code, it is very important to have that ability.
     
  9. Beat me to it. ;)
     
  10. The class name is not the only bad thing. No finals, no annotations, to many return trues, bad variable names. It is something you, @CreepersGamingMc , have to work on.
     
    • Agree Agree x 1
  11. Could someone please just help me fix this? I'm really confused
     
  12. This is the solution
     
  13. Could you give an example please? I'm sorry, I'm new
     
  14. in pastebin at line 35 after return true is the location where you should add a brackey
     
  15. Thanks!
     
  16. It works! Thanks For Your Help!