|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Plugin
Represents a Plugin
The use ofPluginBase
is recommended for actual Implementation
Method Summary | |
---|---|
FileConfiguration |
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. |
com.avaje.ebean.EbeanServer |
getDatabase()
Gets the EbeanServer tied to this plugin |
File |
getDataFolder()
Returns the folder that the plugin data's files are located in. |
ChunkGenerator |
getDefaultWorldGenerator(String worldName,
String id)
Gets a ChunkGenerator for use in a default world, as specified in the server configuration |
PluginDescriptionFile |
getDescription()
Returns the plugin.yaml file containing the details for this plugin |
Logger |
getLogger()
Returns the primary logger associated with this server instance. |
String |
getName()
Returns the name of the plugin. |
PluginLoader |
getPluginLoader()
Gets the associated PluginLoader responsible for this plugin |
InputStream |
getResource(String filename)
Gets an embedded resource in 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 |
boolean |
isNaggable()
Simple boolean if we can still nag to the logs about things |
void |
onDisable()
Called when this plugin is disabled |
void |
onEnable()
Called when this plugin is enabled |
void |
onLoad()
Called after a plugin is loaded but before it has been enabled. |
void |
reloadConfig()
Discards any data in getConfig() and reloads from disk. |
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 |
setNaggable(boolean canNag)
Set naggable state |
Methods inherited from interface org.bukkit.command.TabCompleter |
---|
onTabComplete |
Methods inherited from interface org.bukkit.command.CommandExecutor |
---|
onCommand |
Method Detail |
---|
File getDataFolder()
PluginDescriptionFile getDescription()
FileConfiguration getConfig()
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.
InputStream getResource(String filename)
filename
- Filename of the resource
void saveConfig()
FileConfiguration
retrievable by getConfig()
.
void saveDefaultConfig()
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 saveResource(String resourcePath, boolean replace)
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 reloadConfig()
getConfig()
and reloads from disk.
PluginLoader getPluginLoader()
Server getServer()
boolean isEnabled()
void onDisable()
void onLoad()
void onEnable()
boolean isNaggable()
void setNaggable(boolean canNag)
canNag
- is this plugin still naggable?com.avaje.ebean.EbeanServer getDatabase()
EbeanServer
tied to this plugin
ChunkGenerator getDefaultWorldGenerator(String worldName, String id)
ChunkGenerator
for use in a default world, as specified in the server configuration
worldName
- Name of the world that this will be applied toid
- Unique ID, if any, that was specified to indicate which generator was requested
Logger getLogger()
String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |