Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.plugin.TestPlugin Class Reference
Inheritance diagram for org.bukkit.plugin.TestPlugin:
org.bukkit.plugin.PluginBase org.bukkit.plugin.Plugin org.bukkit.command.TabExecutor org.bukkit.command.TabCompleter org.bukkit.command.CommandExecutor

Public Member Functions

 TestPlugin (String pluginName)
 
void setEnabled (boolean enabled)
 
File getDataFolder ()
 
PluginDescriptionFile getDescription ()
 
FileConfiguration getConfig ()
 
InputStream getResource (String filename)
 
void saveConfig ()
 
void saveDefaultConfig ()
 
void saveResource (String resourcePath, boolean replace)
 
void reloadConfig ()
 
PluginLogger getLogger ()
 
PluginLoader getPluginLoader ()
 
Server getServer ()
 
boolean isEnabled ()
 
void onDisable ()
 
void onLoad ()
 
void onEnable ()
 
boolean isNaggable ()
 
void setNaggable (boolean canNag)
 
EbeanServer getDatabase ()
 
ChunkGenerator getDefaultWorldGenerator (String worldName, String id)
 
boolean onCommand (CommandSender sender, Command command, String label, String[] args)
 
List< String > onTabComplete (CommandSender sender, Command command, String alias, String[] args)
 
- Public Member Functions inherited from org.bukkit.plugin.PluginBase
final int hashCode ()
 
final boolean equals (Object obj)
 
final String getName ()
 

Detailed Description

Definition at line 15 of file TestPlugin.java.

Member Function Documentation

FileConfiguration org.bukkit.plugin.TestPlugin.getConfig ( )

Gets a FileConfiguration for this plugin, read through "config.yml"

If there is a default config.yml embedded in this plugin, it will be provided as a default for this Configuration.

Returns
Plugin configuration

Implements org.bukkit.plugin.Plugin.

Definition at line 36 of file TestPlugin.java.

36  {
37  throw new UnsupportedOperationException("Not supported.");
38  }
EbeanServer org.bukkit.plugin.TestPlugin.getDatabase ( )

Gets the EbeanServer tied to this plugin. This will only be available if enabled in the PluginDescriptionFile#isDatabaseEnabled()

For more information on the use of Avaje Ebeans ORM, see Avaje Ebeans Documentation

For an example using Ebeans ORM, see Bukkit's Homebukkit Plugin

Returns
ebean server instance or null if not enabled

Implements org.bukkit.plugin.Plugin.

Definition at line 96 of file TestPlugin.java.

96  {
97  throw new UnsupportedOperationException("Not supported.");
98  }
File org.bukkit.plugin.TestPlugin.getDataFolder ( )

Returns the folder that the plugin data's files are located in. The folder may not yet exist.

Returns
The folder

Implements org.bukkit.plugin.Plugin.

Definition at line 28 of file TestPlugin.java.

28  {
29  throw new UnsupportedOperationException("Not supported.");
30  }
ChunkGenerator org.bukkit.plugin.TestPlugin.getDefaultWorldGenerator ( String  worldName,
String  id 
)

Gets a ChunkGenerator for use in a default world, as specified in the server configuration

Parameters
worldNameName of the world that this will be applied to
idUnique ID, if any, that was specified to indicate which generator was requested
Returns
ChunkGenerator for use in the default world generation

Implements org.bukkit.plugin.Plugin.

Definition at line 100 of file TestPlugin.java.

100  {
101  throw new UnsupportedOperationException("Not supported.");
102  }
PluginDescriptionFile org.bukkit.plugin.TestPlugin.getDescription ( )

Returns the plugin.yaml file containing the details for this plugin

Returns
Contents of the plugin.yaml file

Implements org.bukkit.plugin.Plugin.

Definition at line 32 of file TestPlugin.java.

32  {
33  return new PluginDescriptionFile(pluginName, "1.0", "test.test");
34  }
PluginLogger org.bukkit.plugin.TestPlugin.getLogger ( )

Returns the plugin logger associated with this server's logger. The returned logger automatically tags all log messages with the plugin's name.

Returns
Logger associated with this plugin

Implements org.bukkit.plugin.Plugin.

Definition at line 60 of file TestPlugin.java.

60  {
61  throw new UnsupportedOperationException("Not supported.");
62  }
PluginLoader org.bukkit.plugin.TestPlugin.getPluginLoader ( )

Gets the associated PluginLoader responsible for this plugin

Returns
PluginLoader that controls this plugin

Implements org.bukkit.plugin.Plugin.

Definition at line 64 of file TestPlugin.java.

64  {
65  throw new UnsupportedOperationException("Not supported.");
66  }
InputStream org.bukkit.plugin.TestPlugin.getResource ( String  filename)

Gets an embedded resource in this plugin

Parameters
filenameFilename of the resource
Returns
File if found, otherwise null

Implements org.bukkit.plugin.Plugin.

Definition at line 40 of file TestPlugin.java.

40  {
41  throw new UnsupportedOperationException("Not supported.");
42  }
Server org.bukkit.plugin.TestPlugin.getServer ( )

Returns the Server instance currently running this plugin

Returns
Server running this plugin

Implements org.bukkit.plugin.Plugin.

Definition at line 68 of file TestPlugin.java.

68  {
69  throw new UnsupportedOperationException("Not supported.");
70  }
boolean org.bukkit.plugin.TestPlugin.isEnabled ( )

Returns a value indicating whether or not this plugin is currently enabled

Returns
true if this plugin is enabled, otherwise false

Implements org.bukkit.plugin.Plugin.

Definition at line 72 of file TestPlugin.java.

72  {
73  return enabled;
74  }
boolean org.bukkit.plugin.TestPlugin.isNaggable ( )

Simple boolean if we can still nag to the logs about things

Returns
boolean whether we can nag

Implements org.bukkit.plugin.Plugin.

Definition at line 88 of file TestPlugin.java.

88  {
89  throw new UnsupportedOperationException("Not supported.");
90  }
boolean org.bukkit.plugin.TestPlugin.onCommand ( CommandSender  sender,
Command  command,
String  label,
String[]  args 
)

Executes the given command, returning its success

Parameters
senderSource of the command
commandCommand which was executed
labelAlias of the command which was used
argsPassed command arguments
Returns
true if a valid command, otherwise false

Implements org.bukkit.command.CommandExecutor.

Definition at line 104 of file TestPlugin.java.

104  {
105  throw new UnsupportedOperationException("Not supported.");
106  }
void org.bukkit.plugin.TestPlugin.onDisable ( )

Called when this plugin is disabled

Implements org.bukkit.plugin.Plugin.

Definition at line 76 of file TestPlugin.java.

76  {
77  throw new UnsupportedOperationException("Not supported.");
78  }
void org.bukkit.plugin.TestPlugin.onEnable ( )

Called when this plugin is enabled

Implements org.bukkit.plugin.Plugin.

Definition at line 84 of file TestPlugin.java.

84  {
85  throw new UnsupportedOperationException("Not supported.");
86  }
void org.bukkit.plugin.TestPlugin.onLoad ( )

Called after a plugin is loaded but before it has been enabled.

When mulitple plugins are loaded, the onLoad() for all plugins is called before any onEnable() is called.

Implements org.bukkit.plugin.Plugin.

Definition at line 80 of file TestPlugin.java.

80  {
81  throw new UnsupportedOperationException("Not supported.");
82  }
List<String> org.bukkit.plugin.TestPlugin.onTabComplete ( CommandSender  sender,
Command  command,
String  alias,
String[]  args 
)

Requests a list of possible completions for a command argument.

Parameters
senderSource of the command
commandCommand which was executed
aliasThe alias used
argsThe arguments passed to the command, including final partial argument to be completed and command label
Returns
A List of possible completions for the final argument, or null to default to the command executor

Implements org.bukkit.command.TabCompleter.

Definition at line 108 of file TestPlugin.java.

108  {
109  throw new UnsupportedOperationException("Not supported.");
110  }
void org.bukkit.plugin.TestPlugin.reloadConfig ( )

Discards any data in getConfig() and reloads from disk.

Implements org.bukkit.plugin.Plugin.

Definition at line 56 of file TestPlugin.java.

56  {
57  throw new UnsupportedOperationException("Not supported.");
58  }
void org.bukkit.plugin.TestPlugin.saveConfig ( )

Saves the FileConfiguration retrievable by getConfig().

Implements org.bukkit.plugin.Plugin.

Definition at line 44 of file TestPlugin.java.

44  {
45  throw new UnsupportedOperationException("Not supported.");
46  }
void org.bukkit.plugin.TestPlugin.saveDefaultConfig ( )

Saves the raw contents of the default config.yml file to the location retrievable by getConfig(). If there is no default config.yml embedded in the plugin, an empty config.yml file is saved. This should fail silently if the config.yml already exists.

Implements org.bukkit.plugin.Plugin.

Definition at line 48 of file TestPlugin.java.

48  {
49  throw new UnsupportedOperationException("Not supported.");
50  }
void org.bukkit.plugin.TestPlugin.saveResource ( String  resourcePath,
boolean  replace 
)

Saves the raw contents of any resource embedded with a plugin's .jar file assuming it can be found using getResource(String).

The resource is saved into the plugin's data folder using the same hierarchy as the .jar file (subdirectories are preserved).

Parameters
resourcePaththe embedded resource path to look for within the plugin's .jar file. (No preceding slash).
replaceif true, the embedded resource will overwrite the contents of an existing file.
Exceptions
IllegalArgumentExceptionif the resource path is null, empty, or points to a nonexistent resource.

Implements org.bukkit.plugin.Plugin.

Definition at line 52 of file TestPlugin.java.

52  {
53  throw new UnsupportedOperationException("Not supported.");
54  }
void org.bukkit.plugin.TestPlugin.setNaggable ( boolean  canNag)

Set naggable state

Parameters
canNagis this plugin still naggable?

Implements org.bukkit.plugin.Plugin.

Definition at line 92 of file TestPlugin.java.

92  {
93  throw new UnsupportedOperationException("Not supported.");
94  }

The documentation for this class was generated from the following file: