[READ ME FIRST] How to make a Plugin Development Thread

Discussion in 'Plugin Development' started by Zombie_Striker, Nov 30, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    Recently there have been many threads created on the Plugin Development forums where the main post does not have all, and in some cases any, of the information needed to help with the thread's problem.

    This problem has been around since I started helping the forums about 2 years ago, and I can imagine it has been around long before that. From what I can tell, there has not been any threads discussing how these help requests should be structured. This is where this post comes in.

    This post is suppose to give a guideline as to how to write up a plugin help request. Since every problem is different, the things listed are what your post should have.

    Before you post:
    Before you even make a post, do the following:
    • Do Rubber-Duck Debugging; Talk out what your code does. Read and say (if needed, out loud) what each and every line of your code does. This will help you see if there are any illogical lines or statements in your code that could be causing the problem.
    • Do Print-Debugging; Have your code print out a line to see if your plugin is running. This is one of the most simplest ways of debugging. All you have to do, is place "System.out.println("Flag")" in your code in the places where you want to see if your code works. If you look at your Command Line after doing a specific task and see "Flag" printed out on one of the lines, you know that bit of your code is being read. If you do not see the "Flag" printed out on one of the lines, you would move that line around until you see it (if you place that line under an if statement, move it above and see if it will print the line) .
    • Use Google; You are most likely not the only person in the world with that problem. Before you make a post, make sure no one else has posted the exact same thing before. Simply go to google and type "Bukkit [if needed, add "Help" ] [Your problem/the thing you are working with]". So, lets say you are having trouble with packets, you would search "Bukkit help Packets", or if you are looking for a specific packet such as "PacketPlayOutWorldBorder", you would type "Bukkit PacketPlayOutWorldBorder"
    • Some common mistakes can be solved using this thread.
    This should solve roughly 80% of the posts on the Plugin Development forums.

    Please keep in mind as well:
    Please do not expect us to post code or give "Example code" (which are exactly the same thing).
    On the Bukkit forums, we call that "Spoonfeeding". The reason why we do not spoonfeed is because
    • Spoonfeeding does not guarantee the code will even work (can be made to not work)
    • Spoonfeeding does not guarantee the code is written the proper way (can have bad practices)
    • Spoonfeeding does not guarantee the person receiving the code will understand how it works.
    • Spoonfeeding does not guarantee the person receiving the code will know how to use it.
    • Spoonfeeding does not guarantee the person receiving the code will know how to modify it to fit whatever they need.
    • Spoonfeeding does not guarantee the person receiving the code is even capable of programming! (spoonfeeding only requires the person to know how to use ctrl+c and ctrl+v)
    We are here to tell you whats wrong, and how to fix it. That is it. If you cannot fix your own code with what we tell you, then you should not be making plugins.

    Now, onto the actual post.

    Your Current Code:
    This is the second most important parts of your thread. This is the main reason why you are here, and letting us see it will be an enormous help to everyone taking the time to read your problem. No one is here to "steal your code" or "Take your idea", most likely, it has been done before. So please, do the following:
    • If your plugin gives you an error message in the Command Line, post your whole class. The error message tells us what line is causing the problem, and it tells us this by giving us the number of lines down the problem starts. If you can: Post the exact line that the error message tells you the error is being caused by.
    • If your plugin does not load at all, post your Main class (The class the extends Java plugin, it does not necessarily have to be named "Main"), your plugin.yml and the structure of your plugin. Most likely, it will be one of those three things that is causing the plugin.
    • If your plugin just simply does not do the thing you want, and it does not give an error message, then post the Main class and the method that does not work (and any method related to it). If your method calls another method in a different class, post that other class.
    Remember: Post your code in the [code][/code] brackets. Do this by going into
    Insert>Code> and past your code. Also format your code before posting. Formatted code is easier to read, and makes it easier to see mistakes.

    An Explanation of your problem:
    This is one of the most import parts of your thread. I have seen many posts that only give a single sentence about what is happening, and a lot more with just the phrase "Doesn't work". This is in no way helpful to anyone reading your post. You may know what you mean by it, but most likely the people reading your code will have no idea what you mean. To help us solve your problem:
    • Give us a detailed explanation of what is happening. What was supposed to happen? What is currently happening? What do you do to recreate the problem?
    • Post any errors you receive. They are there for a reason, so post them. Although to you it may look like random words (Which in that case, you should read this), it contains what the problem is and what line is causing the problem, and from that we can find out what you can do to fix your problem.

    What you have tried:

    This also makes a difference. We need to know what you tried, if anything, to try and fix your problem. Having us tell you to do things that you already done is useless. When posting what you tried:
    • Post the code that you have inserted, deleted, or modified. This will help us see if you have done those things correctly
    • Post the results of what you have done. Tell us if it even has made a change to the plugin or problem in any way.
    • If you have any plugins, remove them and see if that changes anything. Most likely, this will not affect the situation. Only do this if you have any plugins that might interfere with your plugin.
    Example Post:

    . Remember: Use [code][/code]tags by going into Insert>Code> and paste your code. Also format your code before posting. Formatted code is easier to read, and makes it easier to see mistakes.

    . Please post more than one sentence.

    What you can do to recreate the problem:.

    Possible problematic line(s):

    The FULL Error log:
    . We need the full error log from the console. "An internal error has occured" will not help us understand what line is causing the problem.

    What you have tried:
    Last edited by a moderator: Jan 31, 2017
  2. Offline


    Funny, I just wanted to do something like this. This should be a sticky
    Last edited: Nov 30, 2015
  3. Offline


    Actually, your comment "inspired" this thread. It's something that was needed for a long time, but I never really thought about until now.
    btw, remove the quote. It uses unnecessary memory to store a qutote about a post right above yours.
  4. Offline


  5. Offline

    Mrs. bwfctower

    @Zombie_Striker Nice post. Hopefully this will remove some annoyances of the day if people actually read this :D

    It just references the post by its poster's name, the post's ID, and the poster's ID. So honestly it's nothing.
  6. Offline

    timtower Administrator Administrator Moderator

    And the content as I can also only quote part of your post and edit it if I want.
    But storage isn't really an issue on here.
    Mrs. bwfctower likes this.
  7. Offline


    I was going to write this up a long time ago, but i was put off by the fact that 75% of the people who post here appear to be legally blind and dont read anything or use common sense before doing so.

    Good work, regardless
  8. Offline


  9. Offline


    Another quick bump.
  10. Offline

    Mrs. bwfctower

    Supporting this.
    ChipDev likes this.
  11. Offline


    Same. The plugin requests section has a READ ME for how to post a request. Why can't Plugin Development get something similar? Even if people don't read stickies, I hope posting a link to this will have them get the hint.
  12. Offline


    I especially support it. @Zombie_Striker Can we get a vote?
  13. Offline


    What do you mean vote (Do you mean a poll)? What would it contain?
  14. Offline


    A poll yes, with "Do you support this idea?" or something like that, so moderators see it too
  15. Offline

    Mrs. bwfctower

    @teej107 @mcdorli @Zombie_Striker I've reported the OP to notify Curse or whomever has the ability to sticky this, in case the staff haven't seen the later posts.
  16. Offline


    Well written and saves me the trouble of eventually doing this myself. Moved and stickied.
  17. Offline


    (Sorry) My favorite line here. If you don't know Java, you cant use Bukkit.

    Thought I'd point out some typos. Happens to the best of us.
    out loud?
    I think you wanted the space after the comma.

    One period?

    Think you wanted a space after that comma.

    This can be written as the actual tags by using plain tags around it as such [plain][/plain]

    And just a suggestion, maybe suggest Java formatting it. The old formatter was horrible, yes, but the new one is far more readable.
  18. Offline


    Corrections have been made, and recommendation of formatting has been added.
  19. Offline


    @Zombie_Striker, great post btw. I can't believe I forgot to add that.
  20. Offline


    They should require new devs read this thread and take a quiz about the thread and get at least a 90% before they can post. Hehe
    Gonmarte, ChipDev and Zombie_Striker like this.
  21. Offline


    If only the world was that perfect. That idea would drive people away :p
    harry_potter4567 likes this.
  22. Offline


    yea ik. I wish this was that utopia.
  23. Offline


    Another thing you could mention is that if the person spoon-feeding had malicious intent, they could just hide some game-breaking code in the snippet they've given...

    Anyways, thought I'd join everyone in saying this is a good post and if people read this, there'd probably be about 60% less posts :p
  24. Offline

    Mrs. bwfctower

    If they are 'maliciously' spoonfeeding then I don't think they're going to hide some code... If they'd go through that trouble they may as well just explain what to do in plain english.

    Or am I misunderstanding?
  25. Offline


    If you mean they have malicious code embedded inside the code, it is very hard to hide that sort of thing unless they post an entire class. Not only that, but any post with malicious code can be reported.
    timtower likes this.
  26. Offline


    @Mrs. bwfctower
    I think I might be the one misunderstanding here but; if people couldn't be bothered to try and hide malicious code, why do Bukkit have people moderating the posts.

    My point is that they might try and hide it [obfusicator?] and someone may not notice it - also there could be a chance of people in the forums not noticing it but yeah, not a very good point - I was posting at about 10:00 last night :p
  27. Offline

    Mrs. bwfctower

    Mm no I was confused. I was taking "malicious intent" as spoonfeeding for the sake of no good, not spoonfeeding code that did malicious things.
  28. Offline


    Even after you obfuscate the code, someone who really wants it can still get it. Minecraft's code is obfuscated but look at how much we have.
  29. Offline


    But would someone who gets spoonfed be the type of person to go "Oh, this could be malicious, I should de-obfusicate this" or the type of person who would go "hehe im great at making plugins lemmie copy-paste this into notepad hehe"
  30. Offline


    That part discussing spoonfeeding was directed more towards people who would spoonfeed, not the people receiving the code. It's better for a dozen people to ask for code and not receive any than if no one asked for code and someone just gives them an entire method without any comments. Also, the points made were directed more for people who "want to help", as they are more common than someone who wants to harm other coders. Although I should add a section specifically for people who want to be spoonfed, most of what I would say has been covered in THIS thread.
Thread Status:
Not open for further replies.

Share This Page