Class Flags
java.lang.Object
cn.lunadeer.dominion.api.dtos.flag.Flags
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PriFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
static final PriFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
static final EnvFlag
static final EnvFlag
static final PriFlag
static final PriFlag
static final PriFlag
static final EnvFlag
static final EnvFlag
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Applies new custom flags by reloading the configuration and cache.Returns a list of all environment flags.Returns a list of all enabled environment flags.Returns a list of all flags.Returns a list of all enabled flags.Returns a list of all privilege flags.Returns a list of all enabled privilege flags.static EnvFlag
getEnvFlag
(String name) Returns an environment flag by its name.static Flag
Returns a flag by its name from all flags.static PriFlag
getPreFlag
(String name) Returns a privilege flag by its name.static boolean
registerEnvFlag
(org.bukkit.plugin.java.JavaPlugin plugin, EnvFlag flag) Registers an environment flag.static boolean
registerPriFlag
(org.bukkit.plugin.java.JavaPlugin plugin, PriFlag flag) Registers a privilege flag.
-
Field Details
-
ANIMAL_SPAWN
-
ANIMAL_MOVE
-
VILLAGER_SPAWN
-
MONSTER_SPAWN
-
MONSTER_MOVE
-
MONSTER_DAMAGE
-
ENDER_MAN
-
TNT_EXPLODE
-
WITHER_SPAWN
-
CREEPER_EXPLODE
-
DRAGON_BREAK_BLOCK
-
FIRE_SPREAD
-
FLOW_IN_PROTECTION
-
GRAVITY_BLOCK
-
ICE_MELT
-
ICE_FORM
-
SNOW_ACCUMULATION
-
SNOW_MELT
-
TRAMPLE
-
DECAY
-
HOPPER_OUTSIDE
-
PISTON_OUTSIDE
-
TRIG_PRESSURE_PROJ
-
TRIG_PRESSURE_MOB
-
TRIG_PRESSURE_DROP
-
ITEM_FRAME_PROJ_DAMAGE
-
MOB_DROP_ITEM
-
SHOW_BORDER
-
ADMIN
-
MOVE
-
TELEPORT
-
FLY
-
RIDING
-
ENDER_PEARL
-
PLACE
-
BREAK_BLOCK
-
IGNITE
-
PICK_UP
-
DROP_ITEM
-
DOOR
-
BUTTON
-
LEVER
-
PRESSURE
-
REPEATER
-
COMPARER
-
NOTE_BLOCK
-
CONTAINER
-
HOPPER
-
CRAFT
-
CRAFTER
-
ANVIL
-
ENCHANT
-
BREW
-
BEACON
-
JUKEBOX
-
LECTERN
-
DRAGON_EGG
-
ITEM_FRAME_INTERACTIVE
-
EDIT_SIGN
-
BED
-
ANCHOR
-
VEHICLE_SPAWN
-
VEHICLE_DESTROY
-
HARVEST
-
SOWING
-
FEED
-
SHEAR
-
LEASH
-
DYE
-
HONEY
-
CAKE
-
TRADE
-
SHOOT
-
EGG
-
HOOK
-
PVP
-
MONSTER_KILLING
-
ANIMAL_KILLING
-
VILLAGER_KILLING
-
GLOW
-
-
Constructor Details
-
Flags
public Flags()
-
-
Method Details
-
getAllFlags
Returns a list of all flags.- Returns:
- a list of all flags
-
getAllEnvFlags
Returns a list of all environment flags.- Returns:
- a list of all environment flags
-
getAllPriFlags
Returns a list of all privilege flags.- Returns:
- a list of all privilege flags
-
getAllEnvFlagsEnable
Returns a list of all enabled environment flags.- Returns:
- a list of all enabled environment flags
-
getAllPriFlagsEnable
Returns a list of all enabled privilege flags.- Returns:
- a list of all enabled privilege flags
-
getAllFlagsEnable
Returns a list of all enabled flags.- Returns:
- a list of all enabled flags
-
getFlag
Returns a flag by its name from all flags.- Parameters:
name
- the name of the flag- Returns:
- the flag with the given name, or null if not found
-
getEnvFlag
Returns an environment flag by its name.- Parameters:
name
- the name of the environment flag- Returns:
- the environment flag with the given name, or null if not found
-
getPreFlag
Returns a privilege flag by its name.- Parameters:
name
- the name of the privilege flag- Returns:
- the privilege flag with the given name, or null if not found
-
registerEnvFlag
Registers an environment flag.Need to run
applyNewCustomFlags()
to make the new flag work.- Parameters:
plugin
- the plugin registering the flagflag
- the environment flag to register- Returns:
- true if the flag was successfully registered, false otherwise
-
registerPriFlag
Registers a privilege flag.Need to run
applyNewCustomFlags()
to make the new flag work.- Parameters:
plugin
- the plugin registering the flagflag
- the privilege flag to register- Returns:
- true if the flag was successfully registered, false otherwise
-
applyNewCustomFlags
Applies new custom flags by reloading the configuration and cache. This should be called after registering new flags to ensure they take effect.- Throws:
Exception
- if reloading the config or cache fails
-