org.bukkit.plugin.java
Class JavaPluginLoader

java.lang.Object
  extended by org.bukkit.plugin.java.JavaPluginLoader
All Implemented Interfaces:
PluginLoader

public class JavaPluginLoader
extends Object
implements PluginLoader

Represents a Java plugin loader, allowing plugins in the form of .jar


Field Summary
protected  Map<String,Class<?>> classes
          Deprecated. Internal field that wasn't intended to be exposed
protected  Pattern[] fileFilters
          Deprecated. Internal field that wasn't intended to be exposed
protected  Map<String,PluginClassLoader> loaders
          Deprecated. Internal field that wasn't intended to be exposed
 
Constructor Summary
JavaPluginLoader(Server instance)
          Deprecated. 
 
Method Summary
 Map<Class<? extends Event>,Set<RegisteredListener>> createRegisteredListeners(Listener listener, Plugin plugin)
          Creates and returns registered listeners for the event classes used in this listener
 void disablePlugin(Plugin plugin)
          Disables the specified plugin

Attempting to disable a plugin that is not enabled will have no effect

 void enablePlugin(Plugin plugin)
          Enables the specified plugin

Attempting to enable a plugin that is already enabled will have no effect

 Class<?> getClassByName(String name)
          Deprecated. Internal method that wasn't intended to be exposed
protected  File getDataFolder(File file)
          Deprecated. Internal method that wasn't intended to be exposed
 PluginDescriptionFile getPluginDescription(File file)
          Loads a PluginDescriptionFile from the specified file
 Pattern[] getPluginFileFilters()
          Returns a list of all filename filters expected by this PluginLoader
 Plugin loadPlugin(File file)
          Loads the plugin contained in the specified file
 Plugin loadPlugin(File file, boolean ignoreSoftDependencies)
          Deprecated. Relic method from PluginLoader that didn't get purged
 void removeClass(String name)
          Deprecated. Internal method that wasn't intended to be exposed
 void setClass(String name, Class<?> clazz)
          Deprecated. Internal method that wasn't intended to be exposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileFilters

@Deprecated
protected final Pattern[] fileFilters
Deprecated. Internal field that wasn't intended to be exposed

classes

@Deprecated
protected final Map<String,Class<?>> classes
Deprecated. Internal field that wasn't intended to be exposed

loaders

@Deprecated
protected final Map<String,PluginClassLoader> loaders
Deprecated. Internal field that wasn't intended to be exposed
Constructor Detail

JavaPluginLoader

@Deprecated
public JavaPluginLoader(Server instance)
Deprecated. 

This class was not meant to be extended

Method Detail

loadPlugin

public Plugin loadPlugin(File file)
                  throws InvalidPluginException
Description copied from interface: PluginLoader
Loads the plugin contained in the specified file

Specified by:
loadPlugin in interface PluginLoader
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

loadPlugin

@Deprecated
public Plugin loadPlugin(File file,
                                    boolean ignoreSoftDependencies)
                  throws InvalidPluginException
Deprecated. Relic method from PluginLoader that didn't get purged

Throws:
InvalidPluginException

getDataFolder

@Deprecated
protected File getDataFolder(File file)
Deprecated. Internal method that wasn't intended to be exposed


getPluginDescription

public PluginDescriptionFile getPluginDescription(File file)
                                           throws InvalidDescriptionException
Description copied from interface: PluginLoader
Loads a PluginDescriptionFile from the specified file

Specified by:
getPluginDescription in interface PluginLoader
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

public Pattern[] getPluginFileFilters()
Description copied from interface: PluginLoader
Returns a list of all filename filters expected by this PluginLoader

Specified by:
getPluginFileFilters in interface PluginLoader
Returns:
The filters

getClassByName

@Deprecated
public Class<?> getClassByName(String name)
Deprecated. Internal method that wasn't intended to be exposed


setClass

@Deprecated
public void setClass(String name,
                                Class<?> clazz)
Deprecated. Internal method that wasn't intended to be exposed


removeClass

@Deprecated
public void removeClass(String name)
Deprecated. Internal method that wasn't intended to be exposed


createRegisteredListeners

public Map<Class<? extends Event>,Set<RegisteredListener>> createRegisteredListeners(Listener listener,
                                                                                     Plugin plugin)
Description copied from interface: PluginLoader
Creates and returns registered listeners for the event classes used in this listener

Specified by:
createRegisteredListeners in interface PluginLoader
Parameters:
listener - The object that will handle the eventual call back
plugin - The plugin to use when creating registered listeners
Returns:
The registered listeners.

enablePlugin

public void enablePlugin(Plugin plugin)
Description copied from interface: PluginLoader
Enables the specified plugin

Attempting to enable a plugin that is already enabled will have no effect

Specified by:
enablePlugin in interface PluginLoader
Parameters:
plugin - Plugin to enable

disablePlugin

public void disablePlugin(Plugin plugin)
Description copied from interface: PluginLoader
Disables the specified plugin

Attempting to disable a plugin that is not enabled will have no effect

Specified by:
disablePlugin in interface PluginLoader
Parameters:
plugin - Plugin to disable


Copyright © 2013. All Rights Reserved.