Catching command of an other plugin

Discussion in 'Plugin Development' started by ItsHarry, Feb 5, 2012.

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

    ItsHarry

    Hey,

    For a project, I need to know how to catch a player using a command from an other plugin, then do something.
    Example:

    A user uses "/poop" from the plugin PoopCraft.
    I want my plugin "BlahBlah" to then give the user an item.

    How would I do this? Or is the only way I can do this by modding PoopCraft? (Plugin does not really exist btw).

    Thanks :D
     
  2. Offline

    AgentME

    The easiest way that's guaranteed to work in about all cases would be by listening for the PlayerCommandPreprocessEvent event.
     
  3. Offline

    ItsHarry

    Ah! Totally forgot about that, thanks! :D
     
  4. Offline

    ArcheCane

    Well PoopCraft exists now, doesn't it. :p
     
Thread Status:
Not open for further replies.

Share This Page