public interface MagicConfigurable extends MagicProperties
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.bukkit.configuration.ConfigurationSection configuration)
Transfer all properties from a configuration to this store, overwriting any
values already present in the store.
|
void |
configure(String key,
Object value)
Configure a single property.
|
MagicConfigurable |
getStorage(MagicPropertyType storageType)
Retrieve the storage associated with a given type
|
boolean |
removeProperty(String key)
Remove a property from this store.
|
boolean |
upgrade(org.bukkit.configuration.ConfigurationSection configuration)
Transfer properties from a configuration to this store, following a set of
upgrade rules:
String values are replaced unless they match with a case-insensitve comparison
Numeric values are only replaced if they are greater than the ones present already in the store
Certain other special rules apply to specific properties, such as spells are
merged.
|
boolean |
upgrade(String key,
Object value)
Upgrade a single property.
|
describe, describe, getBoolean, getBoolean, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getProperty, getProperty, getProperty, getSectionList, getString, getString, getStringList, hasProperty, isEmptyvoid configure(@Nonnull org.bukkit.configuration.ConfigurationSection configuration)
configuration - The configuration to copy.void configure(@Nonnull String key, @Nonnull Object value)
Do not use this to remove properties, use removeProperty instead.
Do not use this for setting a Map or ConfigurationSection, nested properties should use the above configure method.
key - The property to configure.value - The new property value.boolean upgrade(@Nonnull org.bukkit.configuration.ConfigurationSection configuration)
Anything else is copied over directly, overwriting what is in the store.
configuration - The configuration to copy into this storeboolean upgrade(@Nonnull String key, @Nonnull Object value)
Do not use this to remove properties, use removeProperty instead.
key - The property to upgrade.value - The new value to set, if it is an improvement over the current value.boolean removeProperty(String key)
If this property is inherited, it cannot be removed. If this property exists but an inherited value also exists, the property will now have the inherited value.
key - The key to removeMagicConfigurable getStorage(MagicPropertyType storageType)
Copyright © 2021 elMakers. All rights reserved.