org.bukkit.plugin
Class PluginDescriptionFile

java.lang.Object
  extended by org.bukkit.plugin.PluginDescriptionFile

public final class PluginDescriptionFile
extends Object

Provides access to a Plugins description file, plugin.yaml


Constructor Summary
PluginDescriptionFile(InputStream stream)
           
PluginDescriptionFile(Reader reader)
          Loads a PluginDescriptionFile from the specified reader
PluginDescriptionFile(String pluginName, String pluginVersion, String mainClass)
          Creates a new PluginDescriptionFile with the given detailed
 
Method Summary
 List<String> getAuthors()
           
 String getClassLoaderOf()
           
 Map<String,Map<String,Object>> getCommands()
           
 List<String> getDepend()
           
 String getDescription()
          Gets the description of this plugin
 String getFullName()
          Returns the name of a plugin including the version
 PluginLoadOrder getLoad()
           
 List<String> getLoadBefore()
          Gets the list of plugins that should consider this plugin a soft-dependency
 String getMain()
          Returns the main class for a plugin
 String getName()
          Returns the name of a plugin
 PermissionDefault getPermissionDefault()
           
 List<Permission> getPermissions()
           
 String getPrefix()
           
 List<String> getSoftDepend()
           
 String getVersion()
          Returns the version of a plugin
 String getWebsite()
           
 boolean isDatabaseEnabled()
           
 void save(Writer writer)
          Saves this PluginDescriptionFile to the given writer
 void setDatabaseEnabled(boolean database)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginDescriptionFile

public PluginDescriptionFile(InputStream stream)
                      throws InvalidDescriptionException
Throws:
InvalidDescriptionException

PluginDescriptionFile

public PluginDescriptionFile(Reader reader)
                      throws InvalidDescriptionException
Loads a PluginDescriptionFile from the specified reader

Parameters:
reader - The reader
Throws:
InvalidDescriptionException - If the PluginDescriptionFile is invalid

PluginDescriptionFile

public PluginDescriptionFile(String pluginName,
                             String pluginVersion,
                             String mainClass)
Creates a new PluginDescriptionFile with the given detailed

Parameters:
pluginName - Name of this plugin
pluginVersion - Version of this plugin
mainClass - Full location of the main class of this plugin
Method Detail

save

public void save(Writer writer)
Saves this PluginDescriptionFile to the given writer

Parameters:
writer - Writer to output this file to

getName

public String getName()
Returns the name of a plugin

Returns:
String name

getVersion

public String getVersion()
Returns the version of a plugin

Returns:
String name

getFullName

public String getFullName()
Returns the name of a plugin including the version

Returns:
String name

getMain

public String getMain()
Returns the main class for a plugin

Returns:
Java classpath

getCommands

public Map<String,Map<String,Object>> getCommands()

getDepend

public List<String> getDepend()

getSoftDepend

public List<String> getSoftDepend()

getLoadBefore

public List<String> getLoadBefore()
Gets the list of plugins that should consider this plugin a soft-dependency

Returns:
immutable list of plugins that should consider this plugin a soft-dependency

getLoad

public PluginLoadOrder getLoad()

getDescription

public String getDescription()
Gets the description of this plugin

Returns:
Description of this plugin

getAuthors

public List<String> getAuthors()

getWebsite

public String getWebsite()

isDatabaseEnabled

public boolean isDatabaseEnabled()

setDatabaseEnabled

public void setDatabaseEnabled(boolean database)

getPermissions

public List<Permission> getPermissions()

getPermissionDefault

public PermissionDefault getPermissionDefault()

getClassLoaderOf

public String getClassLoaderOf()

getPrefix

public String getPrefix()


Copyright © 2013. All Rights Reserved.