public class RegistryFlag<T extends com.sk89q.worldedit.registry.Keyed> extends Flag<T>
| Constructor and Description |
|---|
RegistryFlag(java.lang.String name,
RegionGroup defaultGroup,
com.sk89q.worldedit.registry.Registry<T> registry) |
RegistryFlag(java.lang.String name,
com.sk89q.worldedit.registry.Registry<T> registry) |
| Modifier and Type | Method and Description |
|---|---|
com.sk89q.worldedit.registry.Registry<T> |
getRegistry() |
java.lang.Object |
marshal(T o)
Convert the value stored for this flag into a type that can be
serialized into YAML.
|
T |
parseInput(FlagContext context)
Parse a given input to coerce it to a type compatible with the flag.
|
T |
unmarshal(java.lang.Object o)
Convert a raw type that was loaded (from a YAML file, for example)
into the type that this flag uses.
|
chooseValue, getDefault, getName, getRegionGroupFlag, hasConflictStrategy, implicitlySetWithMembership, isValidName, requiresSubject, toString, usesMembershipAsDefaultpublic RegistryFlag(java.lang.String name,
com.sk89q.worldedit.registry.Registry<T> registry)
public RegistryFlag(java.lang.String name,
@Nullable
RegionGroup defaultGroup,
com.sk89q.worldedit.registry.Registry<T> registry)
public T parseInput(FlagContext context) throws InvalidFlagFormat
FlagparseInput in class Flag<T extends com.sk89q.worldedit.registry.Keyed>context - the FlagContextInvalidFlagFormat - Raised if the input is invalidpublic com.sk89q.worldedit.registry.Registry<T> getRegistry()
public T unmarshal(@Nullable java.lang.Object o)
Flag