Represents a Java plugin
| 29 | * Represents a Java plugin |
| 30 | */ |
| 31 | public abstract class JavaPlugin implements Plugin { |
| 32 | private boolean isEnabled = false; |
| 33 | private boolean initialized = false; |
| 34 | private PluginLoader loader = null; |
| 35 | private Server server = null; |
| 36 | private File file = null; |
| 37 | private PluginDescriptionFile description = null; |
| 38 | private File dataFolder = null; |
| 39 | private ClassLoader classLoader = null; |
| 40 | private Configuration config = null; |
| 41 | private boolean naggable = true; |
| 42 | private EbeanServer ebean = null; |
| 43 | private FileConfiguration newConfig = null; |
| 44 | private File configFile = null; |
| 45 | |
| 46 | public JavaPlugin() {} |
| 47 | |
| 48 | /** |
| 49 | * Returns the folder that the plugin data's files are located in. The |
| 50 | * folder may not yet exist. |
| 51 | * |
| 52 | * @return The folder. |
| 53 | */ |
| 54 | public File getDataFolder() { |
| 55 | return dataFolder; |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Gets the associated PluginLoader responsible for this plugin |
| 60 | * |
| 61 | * @return PluginLoader that controls this plugin |
| 62 | */ |
| 63 | public final PluginLoader getPluginLoader() { |
| 64 | return loader; |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Returns the Server instance currently running this plugin |
| 69 | * |
| 70 | * @return Server running this plugin |
| 71 | */ |
| 72 | public final Server getServer() { |
| 73 | return server; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Returns a value indicating whether or not this plugin is currently enabled |
| 78 | * |
| 79 | * @return true if this plugin is enabled, otherwise false |
| 80 | */ |
| 81 | public final boolean isEnabled() { |
| 82 | return isEnabled; |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Returns the file which contains this plugin |
| 87 | * |
| 88 | * @return File containing this plugin |
nothing calls this directly
no outgoing calls
no test coverage detected