diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-19 20:36:44 +0100 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-10-10 21:06:34 +0100 |
commit | ee27cc07f026155e4743b26c7b945a65510b0e60 (patch) | |
tree | 097b86737008f34d46b53378f7719fb6b5b267e0 /src/main/java/org/bukkit/plugin/Plugin.java | |
parent | 963622f8cff9952d01b94b6b4e5a0faa553c3d1c (diff) | |
download | bukkit-ee27cc07f026155e4743b26c7b945a65510b0e60.tar bukkit-ee27cc07f026155e4743b26c7b945a65510b0e60.tar.gz bukkit-ee27cc07f026155e4743b26c7b945a65510b0e60.tar.lz bukkit-ee27cc07f026155e4743b26c7b945a65510b0e60.tar.xz bukkit-ee27cc07f026155e4743b26c7b945a65510b0e60.zip |
Added new Configuration classes
Diffstat (limited to 'src/main/java/org/bukkit/plugin/Plugin.java')
-rw-r--r-- | src/main/java/org/bukkit/plugin/Plugin.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java index 69ced916..37244293 100644 --- a/src/main/java/org/bukkit/plugin/Plugin.java +++ b/src/main/java/org/bukkit/plugin/Plugin.java @@ -2,8 +2,10 @@ package org.bukkit.plugin; import com.avaje.ebean.EbeanServer; import java.io.File; +import java.io.InputStream; import org.bukkit.Server; import org.bukkit.command.CommandExecutor; +import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.generator.ChunkGenerator; import org.bukkit.util.config.Configuration; @@ -33,6 +35,29 @@ public interface Plugin extends CommandExecutor { * @return The configuration */ public Configuration getConfiguration(); + + /** + * Gets a {@link FileConfiguration} for this plugin, read through "config.yml" + * <p> + * If there is a default config.yml embedded in this plugin, it will be provided + * as a default for this Configuration. + * + * @return Plugin configuration + */ + public FileConfiguration getConfig(); + + /** + * Gets an embedded resource in this plugin + * + * @param filename Filename of the resource + * @return File if found, otherwise null + */ + public InputStream getResource(String filename); + + /** + * Saves the {@link FileConfiguration} retrievable by {@link #getConfig()}. + */ + public void saveConfig(); /** * Gets the associated PluginLoader responsible for this plugin |