public interface MagicProperties
| Modifier and Type | Method and Description |
|---|---|
void |
describe(org.bukkit.command.CommandSender sender)
Print all properties to a CommandSender in a human-readable format.
|
void |
describe(org.bukkit.command.CommandSender sender,
Set<String> ignoreProperties)
Print all properties except those in a specific set.
|
boolean |
getBoolean(String key) |
boolean |
getBoolean(String key,
boolean defaultValue) |
double |
getDouble(String key) |
double |
getDouble(String key,
double defaultValue) |
float |
getFloat(String key) |
float |
getFloat(String key,
float defaultValue) |
int |
getInt(String key) |
int |
getInt(String key,
int defaultValue) |
long |
getLong(String key) |
long |
getLong(String key,
long defaultValue) |
Object |
getProperty(String key)
Return the raw value of a key in the store, or null if the key is not
present.
|
<T> T |
getProperty(String key,
Class<T> type)
Get a property only if it is of a specific type.
|
<T> T |
getProperty(String key,
T defaultValue)
Get a property, specifying a default value.
|
List<org.bukkit.configuration.ConfigurationSection> |
getSectionList(String key) |
String |
getString(String key) |
String |
getString(String key,
String defaultValue) |
List<String> |
getStringList(String key) |
boolean |
hasProperty(String key)
Check to see if this property store contains a specific property.
|
boolean |
isEmpty()
Check to see if there is any data here at all.
|
boolean hasProperty(@Nonnull String key)
If this is an inherited store (such as a Wand to a WandTemplate), inherited properties are checked as well.
key - The key to check@Nullable Object getProperty(@Nonnull String key)
key - The key to retrieve@Nullable <T> T getProperty(@Nonnull String key, @Nonnull Class<T> type)
T - The property type.key - The key to retrievetype - The class the value is expected to be@Nonnull <T> T getProperty(@Nonnull String key, @Nonnull T defaultValue)
T - The property type.key - The key to retrievedefaultValue - The value to return if the key is not present in the store or is not the correct type.void describe(org.bukkit.command.CommandSender sender)
sender - Where to print properties.void describe(org.bukkit.command.CommandSender sender,
@Nullable
Set<String> ignoreProperties)
Useful for differentiating between inherited and non-inherited properties.
sender - Where to print properties.ignoreProperties - A set of properties to ignoreboolean isEmpty()
double getDouble(String key, double defaultValue)
double getDouble(String key)
float getFloat(String key, float defaultValue)
float getFloat(String key)
int getInt(String key, int defaultValue)
int getInt(String key)
long getLong(String key, long defaultValue)
long getLong(String key)
boolean getBoolean(String key, boolean defaultValue)
boolean getBoolean(String key)
Copyright © 2021 elMakers. All rights reserved.