Hook Into Essentials Mute/Jail Commands

Discussion in 'Plugin Development' started by Hotshot, Dec 19, 2011.

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

    Hotshot

    Hi, I'm making a plugin and I would like to be able to hook into the Jail and Mute commands that come with Essentials. Anyone know how to do that?
     
  2. Offline

    Xir3tza

    Hm, don´t know, but I´m interested too. Maybe with Vault (But I think it´s only economy)?
     
  3. Offline

    tommycake50

    What would you like to do with these commands may I ask?
     
  4. Offline

    fireblast709

    Hooking into other plugins is basically:
    • add the plugin's jar to your libraries (like you do with bukkit)
    • add the plugin as a dependency to your plugin.yml (optional, but recommended)
    • get the plugin's instance in onEnable:
      Code:java
      1. Bukkit.getPluginManager().getPlugin("name");
    • use that instance to call other methods
     
  5. Offline

    Xir3tza

    Not just the commands, it would be nice if you can get some of the Essentials-config for example.

    Ah, thanks, that works fine ;-) But you have to add a cast to your Plugin (e.g. Essentials) because getPlugin() returns a org.bukkit.plugin.Plugin.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
Thread Status:
Not open for further replies.

Share This Page