My first plugin, while learning Java.

Discussion in 'Plugin Development' started by Daniel Heppner, Mar 1, 2011.

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

    Daniel Heppner

    Okay, so I'm trying to learn Java and I want to make a simple Bukkit plugin that will kick someone who uses some word in their chat.
    Example:
    So, how would I do this? I don't understand how to accept commands with everything constantly changing from onPlayerCommand to onCommand and I don't get what it means to register your events, but I just heard that that's no longer necessary. So, I need a tutorial and I also don't know how to search a string for certain words in Java. The tutorials on the wiki use outdated methods including the super long constructor and onPlayerCommand.
    But maybe I don't need to use onPlayerCommand because I'm not listining to commands, instead I'm listing to their chat messages.

    Yes, I know I'm rambaling and this makes no sence, but I'm just putting out what I'm thinking, so if something I said doesn't make sence to you, tell me, because I really want my plugin developer badge. :D

    Thanks,
    Daniel.

    PS: It would be a good plugin to filter profanity. Oh and I guess I'd like to stop the message from being shown publically. Thanks again.
    PSS: I'd like it to broadcast "[name] has been kicked for using bad language." But I could figure this out.
     
  2. Offline

    Plague

  3. Offline

    Daniel Heppner

    So onPlayerChat is a method that will be called by Bukkit when someone chats? Interesting, I still need a tutorial. :p
     
  4. Offline

    Nohup

    Programming Tutorial is here
    My environment configuration thread is here

    The basic project I have in that thread will set up shells of listeners for you and you just have to rename them and the packages and call them what you want them to be, then add the event handlers as needed. Check out the thread, it may help.
     
  5. Offline

    Plague

  6. Offline

    Daniel Heppner

  7. Offline

    Nohup

    The configuration one? I wrote it last week so hopefully it is fairly up to date lol
     
  8. Offline

    Daniel Heppner

    How about the programming one? Does that use the super long constructor thing?
    --- merged: Mar 2, 2011 3:27 AM ---
    I can't get Maven to work. The environment variables aren't pointing to the right place?
    --- merged: Mar 2, 2011 3:29 AM ---
    I ran the command "set PATH="c:\program files\apache-maven-3.0.x\bin";%PATH%" and that got it to work. You should add that. UPDATE: Nvm, this doesn't work... still need to do some testing though.

    Would someone please help me with this? I want my own plugin! :p
    --- merged: Mar 2, 2011 6:12 AM ---
    Please kan haz help? All I need help with is getting Maven set up.
     
Thread Status:
Not open for further replies.

Share This Page