Help for a beginner

Discussion in 'Plugin Development' started by Bone008, May 1, 2011.

Thread Status:
Not open for further replies.
  1. Hey everyone,
    I'm pretty new to programming plugins for bukkit and I'm getting a couple of issues developing my first plugin (that will be kinda useful - hopefully).

    First of all, what's the point of making attributes in the main-class of the plugin static? Since there seems to be only one instance of the class, it shouldn't matter, afaik. So what am I supposed to use?
    Or are there differences for different things like Listeners, files, strings or whatever?
    I'm sure this is a stupid question, but I hope you won't mind ;-)

    Next, I have an onCommand-method in a CommandExecutor-class.
    When a player issues the assigned command, some sort of creation process will start over multiple commands. It only refers to the player, so my idea was to save his progress in a HashMap until he is finished (then it's saved to a file/database).
    Put what happens then if the player leaves within the creation? Do I have to register a PLAYER_LEAVE-event and update the HashMap? Or can I forget about a dead entry in the HashMap and just leave it?
    And is there a more convenient way to to this?

    Thanks for reading through this, I hope you understand my points.

Thread Status:
Not open for further replies.

Share This Page