public class Presets extends java.lang.Object implements PlayerCleanupListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OPTION_PRESET_SETTING |
| Constructor and Description |
|---|
Presets(org.bukkit.configuration.ConfigurationSection config,
ConfigurationLoader loader,
int cacheTimeout,
Debugger logger,
net.milkbowl.vault.chat.Chat chat) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsPreset(java.lang.String preset,
java.lang.String world) |
Configuration |
getConfiguration(org.bukkit.command.CommandSender sender)
Retrieves the default configuration for the given player.
|
Configuration |
getConfiguration(java.lang.String presetNames,
java.lang.String worldName)
Retrieves a stored configuration from a key value.
|
java.util.Collection<Configuration> |
getConfigurations() |
boolean |
ignorableException(java.lang.Exception e)
Determines whether or not the given exception can be ignored if thrown from getGroupInfoString.
|
void |
onTick() |
void |
removePlayerCache(org.bukkit.entity.Player player)
Removes a given player from being referenced by any preset node.
|
boolean |
usesPresetParameters() |
public static final java.lang.String OPTION_PRESET_SETTING
public Presets(org.bukkit.configuration.ConfigurationSection config,
ConfigurationLoader loader,
int cacheTimeout,
Debugger logger,
net.milkbowl.vault.chat.Chat chat)
public Configuration getConfiguration(java.lang.String presetNames, java.lang.String worldName) throws ParsingException
presetNames - - key value(s) of the configuration to retrieve.worldName - - name of the world the preset is associated with.ParsingException - If the given list of keys is malformed.public Configuration getConfiguration(org.bukkit.command.CommandSender sender) throws ParsingException
sender - - the sender, or NULL to retrieve the generic/default configuration.ParsingException - - If the sender has a malformed preset list.public boolean usesPresetParameters()
public boolean containsPreset(java.lang.String preset,
java.lang.String world)
throws ParsingException
ParsingExceptionpublic java.util.Collection<Configuration> getConfigurations()
public void onTick()
public void removePlayerCache(org.bukkit.entity.Player player)
PlayerCleanupListenerremovePlayerCache in interface PlayerCleanupListenerplayer - - player to remove.public boolean ignorableException(java.lang.Exception e)
e - - the exception to test.Chat.getGroupInfoString