Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Already Existing Plugins

Comments in 'Plugin Development' started by Tethered_, Dec 23, 2014.

  1. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    How can I check whether a certain plugin is installed on the server?
  2. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    No I mean from one plugin, like return a boolean value if a plugin is installed on the server
  3. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    Actually, I suppose I could just figure out whether the directory for the specified plugin exists or not...
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    No. A plugin doesn't always make a directory. And plugins aren't always in the plugins/ directory.

    Do you want to know if it:
    - had been installed once
    - is loaded
    - is enabled
  5. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Use
    PHP:
    getPluginManager();
    functions ;)
    Last edited: Dec 23, 2014
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    That is in no way related...
    Use:
    PHP:
    $plugin $server->getPluginManager()->getPlugin("plugin name");
    if(
    $plugin instanceof Plugin){ // loaded
      
    $enabled $plugin->isEnabled(); // enabled (true) or not enabled (false)
    iksaku likes this.
  7. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Sorry. I confused getPluginLoader(); with getPluginManager(); xD
    PEMapModder likes this.
  8. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    Awesome, thanks!

Share This Page

Advertisement