Dilemma with registering commands.

Discussion in 'Plugin Development' started by CameronK, May 17, 2011.

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

    CameronK

    I've been working on a plugin, CommandKick, which is supposed to simply do the following:

    • allow users to enter a list of commands they want
    • if a user executes a chosen command without permission (or op), they are kicked for trying
    • if a user tries the same command x times in x amount of time, they are banned for x time.
    The problem is that Bukkit requires me to register all the commands that my plugin would try to detect in plugin.yml. Obviously, if the plugin isn't registered to CommandKick, nothing will happen when a user enters it.

    So is there a way to register a command "anonymously", or without use of plugin.yml?
     
  2. Offline

    nisovin

    You would need to use the CommandPreprocessEvent, or something like that. It's a player event.
     
  3. Offline

    CameronK

    Hmm, okay. I'll look into that. Thanks!
     
Thread Status:
Not open for further replies.

Share This Page