Enum Class ControlFlag
- All Implemented Interfaces:
Serializable, Comparable<ControlFlag>, Constable
Enum representing control flags for region management permissions.
Control flags govern administrative actions that members can perform within a region, such as managing other players, modifying region settings, and handling finances. Each flag is represented as a unique bit in a 64-bit integer.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAllows banning players from the region.Allows claiming new chunks for the region.Allows depositing money into the region bank.Allows kicking players from the region.Allows managing region logs (viewing, clearing).Allows creating and managing subareas within the region.Allows renaming the region.Allows setting the region's description.Allows setting global flags that affect all regions.Allows setting member-specific flags (player flags) for region members.Allows setting the region's spawn point.Allows setting the region's weather and time.Allows setting world-specific flags for the region.Allows trusting players to the region.Allows unbanning previously banned players.Allows unclaiming chunks from the region.Allows untrusting players in the region.Allows withdrawing money from the region bank. -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringfrom(long flag) Returns the config name of a flag given its bitmask value.longReturns the bitmask value of this flag.getFlags()Returns a sorted list of all control flag config names.getName()Returns the configuration name of this flag (lowercase with hyphens).getSet(long flags) Returns a list of flag names that are set (enabled) in the given bitmask.getUnset(long flags) Returns a list of flag names that are not set (disabled) in the given bitmask.static longParses a flag name and returns its bitmask value.static ControlFlagReturns the enum constant of this class with the specified name.static ControlFlag[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TRUST_PLAYERS
Allows trusting players to the region. -
UNTRUST_PLAYERS
Allows untrusting players in the region. -
BAN_PLAYERS
Allows banning players from the region. -
UNBAN_PLAYERS
Allows unbanning previously banned players. -
CLAIM_CHUNKS
Allows claiming new chunks for the region. -
UNCLAIM_CHUNKS
Allows unclaiming chunks from the region. -
DEPOSIT_MONEY
Allows depositing money into the region bank. -
WITHDRAW_MONEY
Allows withdrawing money from the region bank. -
SET_GLOBAL_FLAGS
Allows setting global flags that affect all regions. -
SET_WORLD_FLAGS
Allows setting world-specific flags for the region. -
SET_MEMBER_FLAGS
Allows setting member-specific flags (player flags) for region members. -
SET_SPAWN
Allows setting the region's spawn point. -
MANAGE_SUBAREAS
Allows creating and managing subareas within the region. -
RENAME_REGION
Allows renaming the region. -
SET_DESCRIPTION
Allows setting the region's description. -
MANAGE_LOGS
Allows managing region logs (viewing, clearing). -
KICK_PLAYERS
Allows kicking players from the region. -
SET_WEATHER_AND_TIME
Allows setting the region's weather and time.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getFlags
-
parse
Parses a flag name and returns its bitmask value.- Parameters:
name- the config name of the flag (case-insensitive)- Returns:
- the bitmask value, or 0 if not found
-
from
Returns the config name of a flag given its bitmask value.- Parameters:
flag- the bitmask value- Returns:
- the config name, or null if not found
-
getSet
-
getUnset
-
getBitmask
public long getBitmask()Returns the bitmask value of this flag.- Returns:
- the bitmask as a long value
-
getName
Returns the configuration name of this flag (lowercase with hyphens).- Returns:
- the config name
-