Hook into other plugins?

Discussion in 'Plugin Development' started by HappyCow, Jun 17, 2015.

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

    HappyCow

    Hello everyone. Firstly, I am making a Chat Manager Plugin which will stop player from spamming and manage chat contents. But there's a problem. For some times, my another plugin needs to disable the Chat Manager for some players. My situation is, make an arraylist of players needs to disable the chat manager features, then the another plugin can get access to it and add or remove players for the arraylist. How can I do that? Someone said that I can do something like Bukkit.getServer().getPluginManager().getPlugin("Plugin"), but how exactly can I hook into other plugins?
     
  2. Offline

    timtower Administrator Administrator Moderator

    @HappyCow You add the other plugin to your build path, cast the retreived plugin to the main class of the plugin, then you work from there.
     
  3. Offline

    HappyCow

    Sorry but can you give some examples? I apologize that my Java knowledge is low.
     
  4. Offline

    timtower Administrator Administrator Moderator

    Examples for this are difficult, it is specific per plugin what you do.
    Nor do I spoonfeed.
     
Thread Status:
Not open for further replies.

Share This Page