First starting with Eclipse! Tryin to cook up some tasty plugins! But experiencing problems (:c)

Discussion in 'Plugin Development' started by zecheesy, Mar 23, 2012.

  1. Offline

    zecheesy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    What do you link the properties of Craftbukki (snap shot thing) to?
    The tutorial told me to link to http://www.jd.bukkit.org/apidocs/ but thats a fake link and it doesn't work.

    Also, I have gotten this far (not very far):
    [IMG]
    http://i.imgur.com/nnOtD.png
    And why is my class end in .java? I specifically remember making a CLASS file, not a java. Unless CLASS files ARE java things... but are they?

    Last thing: Where do I start putting my command and stuff? Do I make a new folder in my src and put another class file and start making it?
    I want to try to make (sorry for being an ambitionous person):
    • '/testo' that gives you a green message saying: "It works!"
    • But then I want to try to make another command '/goaway' that stops mob-targetting for that player.
    • /website that does the link thing for 1.2.4. Like this:

    [IMG]

    I know these are big steps for a baby like me, but I want to try.

    For those of you who are experienced elders, I would appreciate it so much for if you could help guide me the way of Plugin Making ;)
    Thank you so much.

    This post has been edited 2 times. It was last edited by zecheesy Mar 23, 2012.
  2. Offline

    Darkman2412

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The link is http://jd.bukkit.org/apidocs/ .
    Oh, and all source files are saved as .java files.

    And to the command stuff: you have two ways of handling commands.
    You can either create a new class that implements CommandExecutor, or put a method like underneath in your plugin main.
    Code:
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
    
    }
    I'll give you some hints: sender.sendMessage and ChatColor.GREEN. :D

    if you want more help, just tag me :p

    This post has been edited 4 times. It was last edited by Darkman2412 Mar 23, 2012.
    zecheesy likes this.
  3. Offline

    Double0negative

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    .java files are .class files before they are compiled
    I think it should be this instead (sans the www)
    http://jd.bukkit.org/apidocs/
    To make a command you need to put the command in your plugin.yml and then overide the onCommand method. Also, to be adding src files you shouold be clicking the green C button in the tool bar on eclipse, not going to the folder and making files

    This post has been edited 1 time. It was last edited by Double0negative Mar 23, 2012.
    zecheesy likes this.
  4. Offline

    Darkman2412

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Oh, I just saw that your plugin.yml is in the project main dir, it should be in the src folder. :p
  5. Offline

    zecheesy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Should it be inside the com.gmail.zecheesy package? Should everything in the plugin be under that package?
  6. Offline

    Double0negative

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)

    This post has been edited 1 time. It was last edited by Double0negative Mar 23, 2012.
  7. Offline

    zecheesy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    so plugin.yml should be outside the src folder?
  8. Offline

    JayEffKay

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @zecheesy
    In the main folder is fine, I don't think the location matters that much. Just make sure you include plugin.yml when you export the whole project to a JAR file.
  9. Online

    xGhOsTkiLLeRx

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    And I just saw you use craftubkkit.jar.
    But you should use bukkit.jar!
  10. Offline

    Double0negative

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    no he should be using craftbukkit.jar or he wont have the craftbukkit api. if your just talking about naming the name of the .jar dosnet matter
  11. Offline

    Sabersamus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    no, he should be using Bukkit.jar, bukkit is the API, craftbukkit is the server
  12. Offline

    Double0negative

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    oh nvm i was thinking of something else, although AFAIK craftbukkit will work too
  13. Offline

    Sabersamus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    it wont :L when i first started making plugins i used craftbukkit.jar cause i didnt know how to find bukkit.jar :L nothing worked for me
  14. Offline

    Double0negative

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    well ive been using it lol, works fine for me cause craftbukkit includes the bukkit api
  15. Offline

    comp8nerd4u2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    To be clear, referencing craftbukkit.jar gives you access to the core mechanics. Only do this if you intend to employ "CraftHacks" (Note: that's just a cute little term i've been coining around for the action of "Using bukkit plugins to further mod (hack) the server."). If you do choose to go down that path, remember that a "Real Block" (term I associate with minecraft) and a "CraftBlock" (term I associate with CraftBukkit) is NOT the same thing. Indeed, it can get messy under the hood. Thankfully, your friendly CraftBukkit dev team is here to abstract all that mess for you :) Go CraftBukkit! Lol.
  16. Offline

    kumpelblase2

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    also, some libraries that you might want to use for your plugin are already included by craftbukkit, but not with bukkit. The Gson library for example.
  17. Offline

    zecheesy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    can you link me to the jar?
    I'll rename it Bukkit.jar (just in case some of you guys are right)
  18. Offline

    nicholasntp

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You dont have to rename it, the name of the jar wont change the jar. Thats like saying, "Im gonna call this hot dog mashed potatoes because I want it to be mashed potatoes." It doesnt work. :p

    This post has been edited 1 time. It was last edited by nicholasntp Mar 25, 2012.
    garrett2smart87 likes this.
  19. Offline

    Sabersamus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)

    thats debatable
  20. Offline

    nicholasntp

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    How so?
  21. Offline

    zecheesy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can I use THIS
    As my bukkit jar thing?
  22. Offline

    Sabersamus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)

    if you REALLY believe its gonna be mashed potatoes it will :> just use your immaaaaagiiinaaaatioooonnn :3 lol
  23. Offline

    nicholasntp

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Should work fine.
  24. Offline

    nicholasntp

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Lol true, true.

Share This Page