Class RegistryFlag<T extends com.sk89q.worldedit.registry.Keyed>
java.lang.Object
com.sk89q.worldguard.protection.flags.Flag<T>
com.sk89q.worldguard.protection.flags.RegistryFlag<T>
-
Constructor Summary
ConstructorsConstructorDescriptionRegistryFlag
(String name, com.sk89q.worldedit.registry.Registry<T> registry) RegistryFlag
(String name, RegionGroup defaultGroup, com.sk89q.worldedit.registry.Registry<T> registry) -
Method Summary
Modifier and TypeMethodDescriptioncom.sk89q.worldedit.registry.Registry
<T> Convert the value stored for this flag into a type that can be serialized into YAML.parseInput
(FlagContext context) Parse a given input to coerce it to a type compatible with the flag.Convert a raw type that was loaded (from a YAML file, for example) into the type that this flag uses.Methods inherited from class com.sk89q.worldguard.protection.flags.Flag
chooseValue, getDefault, getName, getRegionGroupFlag, hasConflictStrategy, implicitlySetWithMembership, isValidName, requiresSubject, toString, usesMembershipAsDefault
-
Constructor Details
-
RegistryFlag
-
RegistryFlag
public RegistryFlag(String name, @Nullable RegionGroup defaultGroup, com.sk89q.worldedit.registry.Registry<T> registry)
-
-
Method Details
-
parseInput
Description copied from class:Flag
Parse a given input to coerce it to a type compatible with the flag.- Specified by:
parseInput
in classFlag<T extends com.sk89q.worldedit.registry.Keyed>
- Parameters:
context
- theFlagContext
- Returns:
- The coerced type
- Throws:
InvalidFlagFormat
- Raised if the input is invalid
-
getRegistry
-
unmarshal
Description copied from class:Flag
Convert a raw type that was loaded (from a YAML file, for example) into the type that this flag uses. -
marshal
Description copied from class:Flag
Convert the value stored for this flag into a type that can be serialized into YAML.
-