Solved How to "Handle Reloads"

Discussion in 'Plugin Development' started by Ambamore2000, Dec 23, 2013.

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

    Ambamore2000

  2. Offline

    jimuskin

    Ambamore2000 Do you know how Java methods work? Just use those and then using tutorials, learn how to use the API you posted into the plugin :)
     
  3. Offline

    Ambamore2000

    I know how they work, I just don't know exactally where to put them, like... Idk if this is right:
    package me.Ambamore2000.Plugin;

    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.plugin.java.JavaPlugin;

    public final class Plugin extends JavaPlugin {

    @Override
    public void onEnable(){
    getLogger().info("Enabled!");
    }
    @Override
    public void onDisable(){
    getLogger().info("Disabled!");
    }
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    if(cmd.getName().equalsIgnoreCase("join")){
    void addPlayer (player);
    returntrue;
    }
    returnfalse;
    }
    }
    Or if I'm doing anything wrong. Idk where to put "boolean" or "void" or those stuff.
     
  4. Offline

    jimuskin

    Ambamore2000 likes this.
  5. Offline

    Ambamore2000

  6. Offline

    jimuskin

    Ambamore2000 Solved? If so, please mark this thread as solved!
     
    NathanWolf likes this.
  7. Offline

    Ambamore2000

    :D Yes, solved. THANK YOU SOOOO MUCH

    How to make it solve?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
    NathanWolf likes this.
  8. Offline

    Garris0n

  9. Offline

    jimuskin

    Ambamore2000 In the top right, do "Thread tools" --> "Edit Thread" --> "Prefix" --> "Solved"
     
  10. Offline

    Ambamore2000

  11. Offline

    Garris0n

    You said that the tutorials you linked did not mention "methods". I clicked on your link and did cmd + f "methods". The tutorials you linked did, in fact, mention methods.
     
  12. Offline

    Ambamore2000

    Oh, no, I mean it didn't mention methods this deep. He just goes like "I'll show you how to use SOMETHING in a method". He doesn't explain exactaly explain a full thing about methods.
     
  13. Offline

    Garris0n

  14. Offline

    CeramicTitan

    He asked for clarification, and I think I did a pretty good job explaining it. From my point of view it looked like he was ignoring me.
     
  15. Offline

    Ambamore2000

    No, I'm sorry it looked like that, I just kept forgetting to reply. I was asking 3 websites/people to help at the same time during that moment.
     
  16. Offline

    xTrollxDudex

    jimuskin
    Wat. In my own defense, I was just being literal, how could anyone not comprehend "Put that in your onEnable"
    Here's what code should look like
    PHP:
    public class Example extends JavaPlugin {

        public 
    void onEnable() { //<-- Only method in the entire class

        
    }
        
    //Looks here, not up there ._. Me: *facepalm* what is this guy doing D:

    }
     
    jimuskin likes this.
  17. Offline

    jimuskin

  18. Offline

    xTrollxDudex

    jimuskin
    I'll leave you with the proper definition of flaming :)
    http://en.m.wikipedia.org/wiki/Flaming_(Internet) (Yes, I know wikipedia is bad)

    To clarify: The fact that you still are going to continue this topic to tell someone the thread is solved instigates one to defend himself or point out an error with your logic.

    Please don't reply further, I mean good intentions leaving the proper definition of flaming (which won't be far away when you start replying again ;))
     
  19. Offline

    NathanWolf

    jimuskin I hate to add to this thread, but I did want to commend you on your tolerance and patience :)

    I am also glad the OP was appreciative in the end. Good luck to you, sir!
     
  20. Offline

    Necrodoom

    Since this thread went absolutely trainwreck, locked.

    I simply cannot stress it out enough:
    Report before starting off a flame war. If you have a problem with a post, report it, then leave the thread, and wait for a moderator to deal with it. Going down to the flamer level and flaming back will not make you look better and will just risk you an infraction just like the original flamer. I dont care if you were 'defending' yourself or trying to get a point across, if it goes into flaming people or throwing swear words at people, its an instant removal.

    And on another topic, please make use of the edit button on your posts and do not double post.
     
    jimuskin, Garris0n and NathanWolf like this.
Thread Status:
Not open for further replies.

Share This Page