![]() |
Bukkit
1.4.7-R1.0
|
Inheritance diagram for org.bukkit.plugin.Plugin:
Collaboration diagram for org.bukkit.plugin.Plugin:Public Member Functions | |
| File | getDataFolder () |
| Returns the folder that the plugin data's files are located in. | |
| PluginDescriptionFile | getDescription () |
| Returns the plugin.yaml file containing the details for this plugin. | |
| FileConfiguration | getConfig () |
| Gets a FileConfiguration for this plugin, read through "config.yml". | |
| InputStream | getResource (String filename) |
| Gets an embedded resource in this plugin. | |
| void | saveConfig () |
| Saves the FileConfiguration retrievable by getConfig(). | |
| void | saveDefaultConfig () |
| Saves the raw contents of the default config.yml file to the location retrievable by getConfig(). | |
| void | saveResource (String resourcePath, boolean replace) |
| Saves the raw contents of any resource embedded with a plugin's .jar file assuming it can be found using getResource(String). | |
| void | reloadConfig () |
| Discards any data in getConfig() and reloads from disk. | |
| PluginLoader | getPluginLoader () |
| Gets the associated PluginLoader responsible for this plugin. | |
| Server | getServer () |
| Returns the Server instance currently running this plugin. | |
| boolean | isEnabled () |
| Returns a value indicating whether or not this plugin is currently enabled. | |
| void | onDisable () |
| Called when this plugin is disabled. | |
| void | onLoad () |
| Called after a plugin is loaded but before it has been enabled. | |
| void | onEnable () |
| Called when this plugin is enabled. | |
| boolean | isNaggable () |
| Simple boolean if we can still nag to the logs about things. | |
| void | setNaggable (boolean canNag) |
| Set naggable state. | |
| EbeanServer | getDatabase () |
| Gets the EbeanServer tied to this plugin. | |
| ChunkGenerator | getDefaultWorldGenerator (String worldName, String id) |
| Gets a ChunkGenerator for use in a default world, as specified in the server configuration. | |
| Logger | getLogger () |
| Returns the primary logger associated with this server instance. | |
| String | getName () |
| Returns the name of the plugin. | |
Represents a Plugin.
The use of PluginBase is recommended for actual Implementation
Definition at line 19 of file Plugin.java.
| FileConfiguration org.bukkit.plugin.Plugin.getConfig | ( | ) |
Gets a FileConfiguration for this plugin, read through "config.yml".
If there is a default config.yml embedded in this plugin, it will be provided as a default for this Configuration.
| EbeanServer org.bukkit.plugin.Plugin.getDatabase | ( | ) |
Gets the EbeanServer tied to this plugin.
| File org.bukkit.plugin.Plugin.getDataFolder | ( | ) |
Returns the folder that the plugin data's files are located in.
The folder may not yet exist.
| ChunkGenerator org.bukkit.plugin.Plugin.getDefaultWorldGenerator | ( | String | worldName, |
| String | id | ||
| ) |
Gets a ChunkGenerator for use in a default world, as specified in the server configuration.
| worldName | Name of the world that this will be applied to |
| id | Unique ID, if any, that was specified to indicate which generator was requested |
Referenced by org.bukkit.WorldCreator.getGeneratorForName().
| PluginDescriptionFile org.bukkit.plugin.Plugin.getDescription | ( | ) |
Returns the plugin.yaml file containing the details for this plugin.
Referenced by org.bukkit.permissions.PermissibleBase.addAttachment(), org.bukkit.plugin.java.JavaPluginLoader.createRegisteredListeners(), org.bukkit.plugin.SimplePluginManager.disablePlugin(), org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(), org.bukkit.plugin.SimplePluginManager.enablePlugin(), org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(), org.bukkit.command.PluginCommand.execute(), org.bukkit.WorldCreator.getGeneratorForName(), org.bukkit.plugin.PluginBase.getName(), org.bukkit.plugin.SimplePluginManager.loadPlugin(), org.bukkit.command.PluginCommandYamlParser.parse(), org.bukkit.permissions.PermissionAttachment.PermissionAttachment(), org.bukkit.plugin.PluginLogger.PluginLogger(), org.bukkit.conversations.PluginNameConversationPrefix.PluginNameConversationPrefix(), org.bukkit.command.PluginCommand.tabComplete(), and org.bukkit.command.PluginCommand.toString().
| Logger org.bukkit.plugin.Plugin.getLogger | ( | ) |
Returns the primary logger associated with this server instance.
The returned logger automatically tags all log messages with the plugin's name.
Referenced by org.bukkit.plugin.java.JavaPluginLoader.createRegisteredListeners(), org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(), and org.bukkit.plugin.java.JavaPluginLoader.enablePlugin().
| String org.bukkit.plugin.Plugin.getName | ( | ) |
Returns the name of the plugin.
This should return the bare name of the plugin and should be used for comparison.
Referenced by org.bukkit.plugin.SimplePluginManager.loadPlugin(), and org.bukkit.command.defaults.VersionCommand.tabComplete().
| PluginLoader org.bukkit.plugin.Plugin.getPluginLoader | ( | ) |
Gets the associated PluginLoader responsible for this plugin.
Referenced by org.bukkit.plugin.SimplePluginManager.disablePlugin(), org.bukkit.plugin.SimplePluginManager.enablePlugin(), and org.bukkit.plugin.SimplePluginManager.registerEvents().
| InputStream org.bukkit.plugin.Plugin.getResource | ( | String | filename | ) |
Gets an embedded resource in this plugin.
| filename | Filename of the resource |
| Server org.bukkit.plugin.Plugin.getServer | ( | ) |
Returns the Server instance currently running this plugin.
Referenced by org.bukkit.conversations.PlayerNamePrompt.acceptValidatedInput(), org.bukkit.conversations.PlayerNamePrompt.isInputValid(), and org.bukkit.plugin.PluginLogger.PluginLogger().
| boolean org.bukkit.plugin.Plugin.isEnabled | ( | ) |
Returns a value indicating whether or not this plugin is currently enabled.
Referenced by org.bukkit.permissions.PermissibleBase.addAttachment(), org.bukkit.plugin.SimplePluginManager.disablePlugin(), org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(), org.bukkit.plugin.SimplePluginManager.enablePlugin(), org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(), org.bukkit.command.PluginCommand.execute(), org.bukkit.WorldCreator.getGeneratorForName(), org.bukkit.plugin.SimplePluginManager.isPluginEnabled(), org.bukkit.permissions.PermissionAttachment.PermissionAttachment(), org.bukkit.plugin.SimplePluginManager.registerEvent(), org.bukkit.plugin.SimplePluginManager.registerEvents(), and org.bukkit.plugin.messaging.StandardMessenger.validatePluginMessage().
| boolean org.bukkit.plugin.Plugin.isNaggable | ( | ) |
Simple boolean if we can still nag to the logs about things.
| void org.bukkit.plugin.Plugin.onDisable | ( | ) |
Called when this plugin is disabled.
| void org.bukkit.plugin.Plugin.onEnable | ( | ) |
Called when this plugin is enabled.
| void org.bukkit.plugin.Plugin.onLoad | ( | ) |
Called after a plugin is loaded but before it has been enabled.
When mulitple plugins are loaded, the onLoad() for all plugins is called before any onEnable() is called.
| void org.bukkit.plugin.Plugin.reloadConfig | ( | ) |
Discards any data in getConfig() and reloads from disk.
| void org.bukkit.plugin.Plugin.saveConfig | ( | ) |
Saves the FileConfiguration retrievable by getConfig().
| void org.bukkit.plugin.Plugin.saveDefaultConfig | ( | ) |
Saves the raw contents of the default config.yml file to the location retrievable by getConfig().
If there is no default config.yml embedded in the plugin, an empty config.yml file is saved. This should fail silently if the config.yml already exists.
| void org.bukkit.plugin.Plugin.saveResource | ( | String | resourcePath, |
| boolean | replace | ||
| ) |
Saves the raw contents of any resource embedded with a plugin's .jar file assuming it can be found using getResource(String).
The resource is saved into the plugin's data folder using the same hierarchy as the .jar file (subdirectories are preserved).
| resourcePath | the embedded resource path to look for within the plugin's .jar file. (No preceding slash). |
| replace | if true, the embedded resource will overwrite the contents of an existing file. |
| IllegalArgumentException | if the resource path is null, empty, or points to a nonexistent resource. |
| void org.bukkit.plugin.Plugin.setNaggable | ( | boolean | canNag | ) |
Set naggable state.
| canNag | is this plugin still naggable? |