Resource ModernJavaPlugin - Simplify your Main Classes! (temp locked)

Discussion in 'Spigot Plugin Development' started by HorrendousEntity, Jun 2, 2021.

Thread Status:
Not open for further replies.
  1. Well, registering listeners exists in most plugins, and that was the main motivation to create the class ^.^

    Also it's only 1 class so I didn't care to create a maven repo, but that doesn't mean my code can't be useful lol
  2. It takes way longer to copy your method instead of just writing it oneself
    • Agree Agree x 1
  3. What are you talking about??
  4. His meaning is that it takes time to copy a method.
  5. He didn't ask what he means, I'm asking what he's trying to say
  6. He's implying that your resource is so small that he wouldn't bother to use it. He would write the method himself instead.

    It's classic bigotry on this forum, ignore him. Don't spend your time arguing with people who have nothing better to do than to go around complaining about stuff like this, spend your time developing and learning instead and you'll become a better developer than they ever could with such a stuck up mindset.

    Good resource. :)
    • Agree Agree x 4
    • Friendly Friendly x 2
    • Like Like x 1
    • Funny Funny x 1
  7. MrGeneralQ

    MrGeneralQ Previously qintinator

    I would propose to end any further discussions closing these comments with a final brilliant answer provided by @Creeprr
    • Agree Agree x 1
  8. I see a solid base here.

    I would suggest keeping it in mind and expand upon it whenever you find an annoyance in the default JavaPlugin class.
    Personally, it does not have enough "added value" yet for me to use it in my projects but I like that you are looking at what you think is missing and adding it through inheritance.

    It might also be an idea to take a look at as some of the changes might just fit inside of the Spigot project itself.

    Keep on coding!
    • Like Like x 2
  9. Thank you very much for the comment, and for the good idea to contribute to Spigot.
    I indeed think the inheritance was the best solution(in contrary to a JavaPluginUtil class) because it fits naturally with the idea of "modernizing" the class.
    You're welcome to suggest improvements here or in PMs ;)
  10. don't write a field's name upper case unless it has `static final`(constant) modifiers. it should be like `pluginName`.
  11. You are correct, for some reason I didn't think about that.
    Fixed :)
  12. I am trying to say that copy/pasting your class to my plugins would take longer than just writing the registerListeners method myself.
    I didn‘t complain, I gave my opinion on why I think it‘s not useful in the current state, adding that it might be useful once it‘s not just a gist but a real maven artifact with more methods added to it.
  13. Works just fine:
    Code (Java):
        public void onEnable ()
            getLogger().info("§2First part in green " + ChatColor.RED + "Second part in red.");
  14. Might also have something to do with the terminal emulator in use, not sure though
  15. I really have no idea, I tested both in 1.8 and 1.16, I got the same result..
  16. This resource is not about faster coding lol, and I think it makes a significant difference in readability when you have a lot of listeners classes.

    I personally don't see how a resource's usefulness is determined by where it comes from, but I respect everyones' opinions :)
Thread Status:
Not open for further replies.