Class StringFlag
Stores a string.
-
Constructor Summary
ConstructorsConstructorDescriptionStringFlag(String name)StringFlag(String name, RegionGroup defaultGroup)StringFlag(String name, RegionGroup defaultGroup, String defaultValue)StringFlag(String name, String defaultValue) -
Method Summary
Modifier and TypeMethodDescriptionGet the default value.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, getName, getRegionGroupFlag, hasConflictStrategy, implicitlySetWithMembership, isValidName, requiresSubject, toString, usesMembershipAsDefault
-
Constructor Details
-
StringFlag
-
StringFlag
-
StringFlag
-
StringFlag
-
-
Method Details
-
getDefault
Description copied from class:FlagGet the default value.- Overrides:
getDefaultin classFlag<String>- Returns:
- The default value, if one exists, otherwise
nullmay be returned
-
parseInput
Description copied from class:FlagParse a given input to coerce it to a type compatible with the flag.- Specified by:
parseInputin classFlag<String>- Parameters:
context- theFlagContext- Returns:
- The coerced type
- Throws:
InvalidFlagFormat- Raised if the input is invalid
-
unmarshal
Description copied from class:FlagConvert a raw type that was loaded (from a YAML file, for example) into the type that this flag uses. -
marshal
Description copied from class:FlagConvert the value stored for this flag into a type that can be serialized into YAML.
-