Can you register plugin commands with a command block?

Discussion in 'Plugin Development' started by thebiologist13, Nov 19, 2012.

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

    thebiologist13

    Hi!

    I was wondering if it is possible yet to register the commands you create in a plugin with a command block. For instance, a command like "/derp" defined in my plugin could be executed by a command block. I looked at the TileEntityCommand, CommandMap, PluginCommand, and Command classes, but didn't see a way to do it.

    I was wondering how to do this so the two commands of one of my plugins could work from a command block.

    Thanks!
    ~thebiologist13
     
  2. Offline

    bryce325

    If you are asking if you could create commands in game the answer is yes.
    Although I can not imagine a good use for it.
     
  3. Offline

    beastman3226

    So executing a command from a block?
     
  4. Offline

    thebiologist13

    I mean like, making it so the command blocks in 1.4 could execute commands for my plugin, instead of just the built in ones like tp, give, say, etc.
     
  5. Offline

    KeybordPiano459

    Well technically you could make it so that if you right click on a certain command block the player uses .performCommand
     
  6. Offline

    thebiologist13

    But I need it for when the block get powered, so should I just listen for that event and execute that command on powering? I really would prefer a way to just add the command to what all command blocks know as commands.
     
  7. Offline

    KeybordPiano459

    thebiologist13
    Well as of now, Minecraft doesn't support custom Bukkit commands, Bukkit may provide an API for it in the future.
     
  8. Offline

    thebiologist13

    Thanks! It will be awesome when Bukkit is updated for that. :)

    ~thebiologist13
     
  9. Just wondering if there is any updates on this topic? Are commands blocks able to run a command like /ci or /hat from the essentials plugin or is this still not implemented? Would be really good for a pvp map on a server I help run.
     
  10. Offline

    MajorMagpie

    I am able to use permissionsex commands using commandblocks on a server I work for, so I'm guessing it might work for some, not sure if it is just for pex or other plugins aswell.
     
Thread Status:
Not open for further replies.

Share This Page