Plugin A passes command thru event to Plugin B

Discussion in 'Plugin Development' started by qlimax5000, Feb 23, 2014.

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

    qlimax5000

    Hey, sorry for bad title and this post will also be bad because i can't mention what i want to.
    But if i have Plugin B that gets a command thru the CommandPreProcessEvent then cancels it and does whatever. Then i want Plugin A to force a player to trigger that event with the same command.

    player.chat() doesn't work, this bypasses the event
    player.performCommand() doesn't work, this bypasses the event
    getServer().dispatchCommand() doesn't work, this bypasses the event

    Incase you didn't understand:

    Plugin B has a function i need.
    Plugin B uses a command using CommandPreProcessEvent instead of onCommand
    If Plugin A tries to make the player use a command the event doesn't trigger since it's preprocess

    Thanks
    - Benjamin
     
  2. Offline

    TheKomputerKing

    The callEvent() method.
    I think it's in plugin manager.
     
Thread Status:
Not open for further replies.

Share This Page