# A Simple Plugin Manager # Created by: ShaneBee # Version: 1.1 options: # Change the prefix and perm message to whatever you would like prefix: &7[&aPluginManager&7] permmsg: &cYou do not have permission to use this command #! API # These conditions and effects can be used within your own Skripts #!Effects: # Disable plugin: # Description: Allows you to disable any plugin # Pattern: # disable plugin %string% # Examples: # disable plugin "Essentials" # disable plugin arg-1 # disable plugin {_plugin} # Enable plugin: # Description: Allows you to enable a plugin # Pattern: # enable plugin %string% # Examples: # enable plugin "Essentials" # enable plugin arg-1 # enable plugin {_plugin} #!Conditions: # Plugin exists: # Description: Checks to see if a plugin exists on your server (enabled or disabled) # Pattern: # plugin %string% exists # Examples: # if plugin "Essentials" exists: # Broadcast "Essentials DOES exists on this server" # Plugin enabled/disabled: # Description: Checks if a plugin is enabled or disabled # Pattern: # plugin %string% is (enabled|disabled) # Examples: # if plugin "Essentials" is enabled: # Broadcast "ENABLED" # if plugin "Essentials" is disabled: # Broadcast "DISABLED" #! Do NOT edit any code below this point, or you lose all support import: org.bukkit.Bukkit effect disable plugin[s] %string%: trigger: set {_manager} to Bukkit.getPluginManager() {_manager}.disablePlugin({_manager}.getPlugin(expression-1)) effect enable plugin[s] %string%: trigger: set {_manager} to Bukkit.getPluginManager() {_manager}.enablePlugin({_manager}.getPlugin(expression-1)) condition plugin %string% exists: check: if Bukkit.getPluginManager().getPlugin(expression-1) is set: continue condition plugin %string% is (1¦enabled|2¦disabled): check: if Bukkit.getPluginManager().isPluginEnabled(expression-1): if parse mark is 1: continue else: if parse mark is 2: continue command /disable : permission: pluginmanager.admin permission message: {@prefix} - {@permmsg} trigger: if arg-1 is "all": set {_list} to "%Bukkit.getPluginManager().getPlugins()%" set {_list::*} to {_list} split at ", " set {_num} to 0 loop {_list::*}: set {_test} to "%loop-value%" set {_test::*} to {_test} split at " " if Bukkit.getPluginManager().isPluginEnabled({_test::1}): if {_test::1} is not "skript-mirror" or "Skript" or "ProtocolSupport": set {_manager} to Bukkit.getPluginManager() {_manager}.disablePlugin({_manager}.getPlugin({_test::1})) add 1 to {_num} send "{@prefix} - &b%{_num}% &6plugin(s) were disabled" else: if plugin arg-1 exists: if plugin arg-1 is enabled: disable plugin arg-1 send "{@prefix} - &b%arg-1% &ahas been disabled" stop else: send "{@prefix} - &b%arg-1% &cis already disabled" else: send "{@prefix} - &b%arg-1% &cis not a current plugin, check your spelling or use /pl to verify the plugin name" command /enable : permission: pluginmanager.admin permission message: {@prefix} - {@permmsg} trigger: if plugin arg-1 exists: if plugin arg-1 is disabled: enable plugin arg-1 send "{@prefix} - &b%arg-1% &ahas been enabled" else: send "{@prefix} - &b%arg-1% &cis not disabled" else: send "{@prefix} - &b%arg-1% &cis not a current plugin, check your spelling or use /pl to verify the plugin name"