Package org.bukkit.plugin.java
Class JavaPluginLoader
java.lang.Object
org.bukkit.plugin.java.JavaPluginLoader
- All Implemented Interfaces:
PluginLoader
Deprecated, for removal: This API element is subject to removal in a future version.
Represents a Java plugin loader, allowing plugins in the form of .jar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateRegisteredListeners
(@NotNull Listener listener, @NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Creates and returns registered listeners for the event classes used in this listenervoid
disablePlugin
(@NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Disables the specified pluginvoid
enablePlugin
(@NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Enables the specified plugingetClassByName
(String name, boolean resolve, PluginDescriptionFile description) Deprecated, for removal: This API element is subject to removal in a future version.protected Class<?>
getClassByName
(String name, boolean resolve, PluginDescriptionFile description, PluginClassLoader requester) Deprecated, for removal: This API element is subject to removal in a future version.getPluginDescription
(@NotNull File file) Deprecated, for removal: This API element is subject to removal in a future version.Loads a PluginDescriptionFile from the specified fileDeprecated, for removal: This API element is subject to removal in a future version.Returns a list of all filename filters expected by this PluginLoaderloadPlugin
(@NotNull File file) Deprecated, for removal: This API element is subject to removal in a future version.Loads the plugin contained in the specified fileprotected PluginClassLoader
newPluginLoader
(JavaPluginLoader loader, ClassLoader parent, PluginDescriptionFile description, File dataFolder, File file, ClassLoader libraryLoader) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bukkit.plugin.PluginLoader
disablePlugin
-
Constructor Details
-
JavaPluginLoader
Deprecated.This class was not meant to be constructed explicitly- Parameters:
instance
- the server instance
-
-
Method Details
-
loadPlugin
@NotNull public @NotNull Plugin loadPlugin(@NotNull @NotNull File file) throws InvalidPluginException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginLoader
Loads the plugin contained in the specified file- Specified by:
loadPlugin
in interfacePluginLoader
- Parameters:
file
- File to attempt to load- Returns:
- Plugin that was contained in the specified file, or null if unsuccessful
- Throws:
InvalidPluginException
- Thrown when the specified file is not a plugin
-
newPluginLoader
protected PluginClassLoader newPluginLoader(JavaPluginLoader loader, ClassLoader parent, PluginDescriptionFile description, File dataFolder, File file, ClassLoader libraryLoader) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
Exception
-
getPluginDescription
@NotNull public @NotNull PluginDescriptionFile getPluginDescription(@NotNull @NotNull File file) throws InvalidDescriptionException Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginLoader
Loads a PluginDescriptionFile from the specified file- Specified by:
getPluginDescription
in interfacePluginLoader
- Parameters:
file
- File to attempt to load from- Returns:
- A new PluginDescriptionFile loaded from the plugin.yml in the specified file
- Throws:
InvalidDescriptionException
- If the plugin description file could not be created
-
getPluginFileFilters
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginLoader
Returns a list of all filename filters expected by this PluginLoader- Specified by:
getPluginFileFilters
in interfacePluginLoader
- Returns:
- The filters
-
getClassByName
@Nullable protected @Nullable Class<?> getClassByName(String name, boolean resolve, PluginDescriptionFile description) Deprecated, for removal: This API element is subject to removal in a future version. -
getClassByName
protected Class<?> getClassByName(String name, boolean resolve, PluginDescriptionFile description, PluginClassLoader requester) Deprecated, for removal: This API element is subject to removal in a future version. -
createRegisteredListeners
@NotNull public @NotNull Map<Class<? extends Event>,Set<RegisteredListener>> createRegisteredListeners(@NotNull @NotNull Listener listener, @NotNull @NotNull Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginLoader
Creates and returns registered listeners for the event classes used in this listener- Specified by:
createRegisteredListeners
in interfacePluginLoader
- Parameters:
listener
- The object that will handle the eventual call backplugin
- The plugin to use when creating registered listeners- Returns:
- The registered listeners.
-
enablePlugin
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginLoader
Enables the specified pluginAttempting to enable a plugin that is already enabled will have no effect
- Specified by:
enablePlugin
in interfacePluginLoader
- Parameters:
plugin
- Plugin to enable
-
disablePlugin
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PluginLoader
Disables the specified pluginAttempting to disable a plugin that is not enabled will have no effect
- Specified by:
disablePlugin
in interfacePluginLoader
- Parameters:
plugin
- Plugin to disable
-