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

Disable plugin by itself

Comments in 'Plugin Development' started by MyNameIsTriXz, Dec 27, 2015.

  1. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    How?
  2. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    PHP:
    $this->getServer()->getPluginManager()->disablePlugin($this->getServer()->getPluginManager()->getPlugin("ThePluginName"));
    iDirtPlayzMC likes this.
  3. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    PHP:
    $this->getServer()->getPluginManager()->disablePlugin($plugin);
    iDirtPlayzMC likes this.
  4. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    what if he doesn't use a Plugin object in $plugin?
    iDirtPlayzMC likes this.
  5. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Then he will get an error. My code is correct, or should I write 'Plugin $plugin' in the brackets? That'd be wrong.
    applqpak and iDirtPlayzMC like this.
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    $this is already the plugin object...
    CraftYourBukkit likes this.

Share This Page

Advertisement