public final class WGMetadata extends Object
WorldGuard is placed as the owner of all values.
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getIfPresent(org.bukkit.metadata.Metadatable target,
String key,
Class<T> expected)
Get the (first) metadata value on the given target that has the given
key and is of the given class type.
|
static void |
put(org.bukkit.metadata.Metadatable target,
String key,
Object value)
Add some metadata to a target.
|
public static void put(org.bukkit.metadata.Metadatable target,
String key,
Object value)
target - the targetkey - the keyvalue - the value@Nullable public static <T> T getIfPresent(org.bukkit.metadata.Metadatable target, String key, Class<T> expected)
T - the type of the valuetarget - the targetkey - the keyexpected - the type of the valuenull if one does not existsCopyright © 2015. All Rights Reserved.