Intermediate BUKKIT plugin Tutorial

Discussion in 'Resources' started by Samkio, Jan 26, 2011.

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


  2. Can someone show some corrections as to how to get the player commands to work, now that PLAYER_COMMAND has been removed. and now they use CommandSender and all that stuff.
  3. Offline


  4. @Samkio
    Yes i have seen it, its very good thanks. Still a bit difficult to figure out how to make multi word commands :/ im sorry that im noob hehe. i tried a shot at it but it didnt work. the server kept throwing the command usage back at me rather than do anything. thanks anyway. ill try to fool around with it.
  5. Offline


    I tried importing your source and tried typing it by hand, following every instruction in eclipse, with java 1.6 and the latest bukkit as of this post, and I get the following two errors. Can you tell what I'm doing wrong? :
    "The constructor JavaPlugin(PluginLoader, Server, PluginDescriptionFile, File, File, ClassLoader) is undefined" line 34
    "PLAYER_COMMAND cannot be resolved or is not a field" line 51
    It's been years and years and I feel like I'm getting java rusty

    UPDATE: I think I've tracked the issue to a change in bukkit, specifically Feature #159 changing the way the constructor works. I'm still not good enough to know how to fix it though, but if anyone else has a suggestion, I can say I've gotten a plugin to work in eclipse. Still downloading more and more plugin sources to try to find one that does it differently so I can learn how to fix this error.

    Update2: I removed the constructor and it compiled fine. No more trouble with JavaPlugin. BUT, PLAYER_COMMAND is still an issue. Looking into how to solve this. Lots of bukkit changes since this tutorial make me wonder if "basic" bukkit tutorials are even possible, since who has the time to constantly update the source in a tutorial? I wish free projects like had an eye toward backward compatibility. There's something magic about taking api code that worked on Windows 95 and using it in Windows 7 (windows 2010?). 15 years of new stuff and the API of the past can still work if you care to make it work. Well, if anyone wants to help me with an idiot-simple solution to make this code run, I'd glady high five them. I also wonder why I can't get either this or the basic tutorial plugin to show up in my server when I modify the PLAYER_COMMAND to some other PLAYER_EVENT. You would think it would at least show up in the plugins list or something.

    Update3: I finally got some other plugin to load into my server. I have no idea why this still won't, but I suspect there may be a change in bukkit I'm not compensating for. The plugin I got working was the source from serverport.
  6. Offline


    Ok i have a tip here for the ones that love the TRIAL ERROR method :p

    if you are using Eclipse you can use a very fast shortcut to build a project. first of all close all other projects you are working on except the one you would like to build. now build it manually once and set the path etc... ok and when you're done you can use this shortcut:

    ALT-Key-down, F, O, ALT-Key-up, ENTER, ENTER, SPACE, ENTER

    now when you learn this keystrokes from your head it would be allot faster and nicer to work with since you dont have to use your mouse to build a project. I hope you guys are using this :p and if you have any questions just ask me ;)
  7. Offline


    Samkio likes this.
Thread Status:
Not open for further replies.

Share This Page