[Beginner Tutorial] Chat messages and ItemStacks

Discussion in 'Resources' started by eagledude4, Mar 15, 2011.

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

    eagledude4

    Outdated
     
  2. Offline

    Sammy

    Cool tutorial man =)
    Just two "corrections":

    You can't use com.bukkit.* as a package name
    Code:
    main: com.bukkit.eagledude4.commands.commands
    and on the yml file you don't or shouldn't put the command name on the usage.

    Code:
      regiontools:
        description: gives region items
        usage: |
               /<command> - Gives region items
    If you keep <command> the "yaml handler" will change it to the commands name, in this case regiontools.
    It's just a easyer way to change the cmds name ;)
     
  3. Offline

    eagledude4

    I just changed it. Thanks.
     
  4. Offline

    multi_coder

    This import is needed as well:
    import org.bukkit.Material;
     
  5. Offline

    eagledude4

    Woops, How did I miss that one lol?
     
  6. Offline

    Erbros

    Thank you for the tutorial! :)
     
  7. Offline

    eagledude4

    Anytime ^^
     
  8. Offline

    cyberbobjr

    Hi,
    forgive my ignorance but i thought that onCommand was deprecated and replaced by "executor" class, like this for example :
    Code:
    getCommand("tp").setExecutor(new GivePluginCommand(this))
    thanks to your help.
    regards.
     
  9. Offline

    clash

    The Plugin interface extends CommandExecutor, so you can use onCommand() in your Plugin class, or write separate classes that implement CommandExecutor and provide their own onCommand(). Both are supported.
     
  10. Offline

    cyberbobjr

    thank you for your answer and your tutorial :)
     
  11. Offline

    itsatacoshop247

    Thanks for this, but what do I need to import to use getServer()?
    (Sorry if I'm being stupid, I'm new to Java.)

    EDIT: I figured it out by looking at some source codes, it has to be plugin.getServer()
     
  12. Offline

    eagledude4

    Strange, It doesn't tell me I need to import anything for getServer.
     
  13. Offline

    killerrj8

    hey Im new and i get Errors :(
    Is this tutorial outdatet or sumthing or is it me ?
    I dont get Errors in Eclipse but in the console i get lots of errors and in brackets after the Error (unknown source)
     
  14. Offline

    eagledude4

    It's very possible this thread is outdated. But if your not seeing errors in your Eclipse, then I don't know.
     
  15. Offline

    Techwiz101

    Could you please update this thread.
    I tried following it and I get Illegal modifier for parameter onCommand; only final is permitted.
    Code:
    public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
    Any idea on how to fix it?
     
  16. Offline

    eagledude4

    It's been a while since I wrote any plugins for bukkit, so I don't know the answer to your problem. There has to be more recent tutorials you can use to solve your problem.
     
Thread Status:
Not open for further replies.

Share This Page