how to send command from another plugin?

Discussion in 'Plugin Development' started by JoeMaximum, Feb 5, 2011.

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


    How can i send a command from another plugin, from my plugin?

    For example, i got some function to write in the .yml file to promote someone. After this i would like the permissions to be automaticly refreshed by sending the command "/pr".
  2. Offline


    if the plugin is using PlayerListener.onPlayerCommand() [the old system]

    you can do :

    PlayerChatEvent event = new PlayerChatEvent(Type.PLAYER_COMMAND, player, "/pr");
    for the new system there is no clean way to do it yet
  3. Offline

    Joshua Burt

    If the plugin that listens for '/pr' responding to custom events to handle the logic, then you might be able to manually assert the appropriate event for the plugin's listener class from within yours.
Thread Status:
Not open for further replies.

Share This Page