Ok so I'm fairly new to programming but I'm attempting something simple to get me started. I'm using the wiki guide found at http://wiki.bukkit.org/Programming_A_Plugin as well as some source code that relates to what I'm trying. However eclipse keeps telling me that the event PLAYER_COMMAND cannot be resolved, any reason why, or am I just using an old tutorial and that event has been removed. Code: pm.registerEvent(Event.Type.PLAYER_COMMAND, playerListener, Priority.Normal, this);
No problem, been learning myself, and the least I can do is help someone who has had the same problem as me, also bear in mind you now need to add commands to the plugin.yml file
I went through that yesterday - the "This tutorial is out of date" isn't far off - but found you can use PLAYER_COMMAND_PREPROCESS to do much the same job. I should really move to the OnCommand method, but haven't dug through anybodys code yet to work out how to do it.
Hey guys. If you want to see an example my SimpleAlias plugin has examples of both onCommand and PLAYER_COMMAND_PREPROCESS. https://github.com/madcap/SimpleAlias onCommand is definitely the way to go in most cases since commands could technically come from sources besides just players.