Class Flags

java.lang.Object
cn.lunadeer.dominion.api.dtos.flag.Flags

public class Flags extends Object
Built-in environment and privilege flags and the flag registry.

The public constants are the canonical flag instances. Custom flags can be registered with registerEnvFlag(JavaPlugin, EnvFlag) or registerPriFlag(JavaPlugin, PriFlag). Legacy constants are kept for migration and are not returned by the active-flag lookup methods.

  • Field Details

    • ANIMAL_SPAWN

      public static final EnvFlag ANIMAL_SPAWN
      Controls natural or world-generated animal spawning.
    • ANIMAL_BREED

      public static final EnvFlag ANIMAL_BREED
      Controls animal breeding.
    • ANIMAL_SPAWNER

      public static final EnvFlag ANIMAL_SPAWNER
      Controls animal spawning from monster spawners.
    • ANIMAL_SPAWN_EGG

      public static final EnvFlag ANIMAL_SPAWN_EGG
      Controls creation of animals with spawn eggs.
    • ANIMAL_MOVE

      public static final EnvFlag ANIMAL_MOVE
      Controls animal movement inside a dominion.
    • VILLAGER_SPAWN

      public static final EnvFlag VILLAGER_SPAWN
      Controls natural or world-generated villager spawning.
    • VILLAGER_BREED

      public static final EnvFlag VILLAGER_BREED
      Controls villager breeding.
    • VILLAGER_SPAWNER

      public static final EnvFlag VILLAGER_SPAWNER
      Controls villager spawning from monster spawners.
    • VILLAGER_SPAWN_EGG

      public static final EnvFlag VILLAGER_SPAWN_EGG
      Controls creation of villagers with spawn eggs.
    • MONSTER_SPAWN

      public static final EnvFlag MONSTER_SPAWN
      Controls natural or world-generated monster spawning.
    • MONSTER_SPAWNER

      public static final EnvFlag MONSTER_SPAWNER
      Controls monster spawning from monster spawners.
    • MONSTER_SPAWN_EGG

      public static final EnvFlag MONSTER_SPAWN_EGG
      Controls creation of monsters with spawn eggs.
    • MONSTER_MOVE

      public static final EnvFlag MONSTER_MOVE
      Controls monster movement inside a dominion.
    • MONSTER_DAMAGE

      public static final EnvFlag MONSTER_DAMAGE
      Controls damage dealt to players by monsters.
    • ENDER_MAN

      @Deprecated public static final EnvFlag ENDER_MAN
      Deprecated.
      Former combined Enderman block movement flag retained for migration.
    • ENDER_MAN_PICKUP_BLOCK

      public static final EnvFlag ENDER_MAN_PICKUP_BLOCK
      Controls Endermen picking up blocks.
    • ENDER_MAN_PLACE_BLOCK

      public static final EnvFlag ENDER_MAN_PLACE_BLOCK
      Controls Endermen placing blocks.
    • ENDER_MAN_SPAWN

      public static final EnvFlag ENDER_MAN_SPAWN
      Controls Enderman spawning.
    • ENDER_MAN_TELEPORT

      public static final EnvFlag ENDER_MAN_TELEPORT
      Controls Enderman teleportation.
    • TNT_EXPLODE

      public static final EnvFlag TNT_EXPLODE
      Controls TNT explosion block damage.
    • TNT_DAMAGE_ENTITY

      public static final EnvFlag TNT_DAMAGE_ENTITY
      Controls TNT explosion damage to ordinary entities.
    • WITHER_SPAWN

      public static final EnvFlag WITHER_SPAWN
      Controls Wither spawning.
    • WITHER_EXPLODE

      public static final EnvFlag WITHER_EXPLODE
      Controls block damage caused by a Wither spawning explosion.
    • WITHER_BREAK_BLOCK

      public static final EnvFlag WITHER_BREAK_BLOCK
      Controls block breaking caused by an injured Wither.
    • CREEPER_EXPLODE

      public static final EnvFlag CREEPER_EXPLODE
      Controls Creeper explosion block damage.
    • CREEPER_DAMAGE_ENTITY

      public static final EnvFlag CREEPER_DAMAGE_ENTITY
      Controls Creeper explosion damage to ordinary entities.
    • WITHER_SKULL_EXPLODE

      public static final EnvFlag WITHER_SKULL_EXPLODE
      Controls Wither Skull explosion block damage.
    • WITHER_SKULL_DAMAGE_ENTITY

      public static final EnvFlag WITHER_SKULL_DAMAGE_ENTITY
      Controls Wither Skull explosion damage to ordinary entities.
    • ENDER_CRYSTAL_EXPLODE

      public static final EnvFlag ENDER_CRYSTAL_EXPLODE
      Controls End Crystal explosion block damage.
    • ENDER_CRYSTAL_DAMAGE_ENTITY

      public static final EnvFlag ENDER_CRYSTAL_DAMAGE_ENTITY
      Controls End Crystal explosion damage to ordinary entities.
    • FIREBALL_EXPLODE

      public static final EnvFlag FIREBALL_EXPLODE
      Controls Fireball explosion block damage.
    • FIREBALL_DAMAGE_ENTITY

      public static final EnvFlag FIREBALL_DAMAGE_ENTITY
      Controls Fireball explosion damage to ordinary entities.
    • TNT_DAMAGE_ARMOR_STAND

      public static final EnvFlag TNT_DAMAGE_ARMOR_STAND
      Controls TNT explosion damage to armor stands.
    • TNT_DAMAGE_HANGING_ENTITY

      public static final EnvFlag TNT_DAMAGE_HANGING_ENTITY
      Controls TNT explosion damage to hanging entities.
    • CREEPER_DAMAGE_ARMOR_STAND

      public static final EnvFlag CREEPER_DAMAGE_ARMOR_STAND
      Controls Creeper explosion damage to armor stands.
    • CREEPER_DAMAGE_HANGING_ENTITY

      public static final EnvFlag CREEPER_DAMAGE_HANGING_ENTITY
      Controls Creeper explosion damage to hanging entities.
    • WITHER_SKULL_DAMAGE_ARMOR_STAND

      public static final EnvFlag WITHER_SKULL_DAMAGE_ARMOR_STAND
      Controls Wither Skull explosion damage to armor stands.
    • WITHER_SKULL_DAMAGE_HANGING_ENTITY

      public static final EnvFlag WITHER_SKULL_DAMAGE_HANGING_ENTITY
      Controls Wither Skull explosion damage to hanging entities.
    • ENDER_CRYSTAL_DAMAGE_ARMOR_STAND

      public static final EnvFlag ENDER_CRYSTAL_DAMAGE_ARMOR_STAND
      Controls End Crystal explosion damage to armor stands.
    • ENDER_CRYSTAL_DAMAGE_HANGING_ENTITY

      public static final EnvFlag ENDER_CRYSTAL_DAMAGE_HANGING_ENTITY
      Controls End Crystal explosion damage to hanging entities.
    • FIREBALL_DAMAGE_ARMOR_STAND

      public static final EnvFlag FIREBALL_DAMAGE_ARMOR_STAND
      Controls Fireball explosion damage to armor stands.
    • FIREBALL_DAMAGE_HANGING_ENTITY

      public static final EnvFlag FIREBALL_DAMAGE_HANGING_ENTITY
      Controls Fireball explosion damage to hanging entities.
    • BED_EXPLODE

      public static final EnvFlag BED_EXPLODE
      Controls bed explosions and their block damage.
    • ANCHOR_EXPLODE

      public static final EnvFlag ANCHOR_EXPLODE
      Controls respawn-anchor explosions and their block damage.
    • BLOCK_EXPLODE

      @Deprecated public static final EnvFlag BLOCK_EXPLODE
      Deprecated.
      Former combined bed and respawn-anchor explosion flag retained for migration.
    • DRAGON_BREAK_BLOCK

      public static final EnvFlag DRAGON_BREAK_BLOCK
      Controls Ender Dragon block breaking.
    • FIRE_SPREAD

      public static final EnvFlag FIRE_SPREAD
      Controls fire spreading.
    • BURN

      @Deprecated public static final EnvFlag BURN
      Deprecated.
      Former combined burn flag from before block/entity burning was split.
    • BURN_BLOCK

      public static final EnvFlag BURN_BLOCK
      Controls blocks burning.
    • BURN_ENTITY

      @Deprecated public static final EnvFlag BURN_ENTITY
      Deprecated.
      Former combined fire/lava entity damage flag retained for migration.
    • BURN_ENTITY_FIRE

      public static final EnvFlag BURN_ENTITY_FIRE
      Controls non-player entities taking fire damage.
    • BURN_ENTITY_LAVA

      public static final EnvFlag BURN_ENTITY_LAVA
      Controls non-player entities taking lava or hot-floor damage.
    • FLOW_IN_WATER

      public static final EnvFlag FLOW_IN_WATER
      Controls external water flowing into the dominion.
    • FLOW_IN_LAVA

      public static final EnvFlag FLOW_IN_LAVA
      Controls external lava flowing into the dominion.
    • FLOW_IN_PROTECTION

      @Deprecated public static final EnvFlag FLOW_IN_PROTECTION
      Deprecated.
      Former combined water/lava flow flag retained for migration.
    • GRAVITY_BLOCK

      public static final EnvFlag GRAVITY_BLOCK
      Controls gravity-affected blocks falling inside the dominion.
    • ICE_MELT

      public static final EnvFlag ICE_MELT
      Controls ice melting.
    • ICE_FORM_NATURAL

      public static final EnvFlag ICE_FORM_NATURAL
      Controls natural ice formation.
    • ICE_FORM_FROST_WALKER

      public static final EnvFlag ICE_FORM_FROST_WALKER
      Controls ice formation caused by Frost Walker.
    • ICE_FORM

      @Deprecated public static final EnvFlag ICE_FORM
      Deprecated.
      Former combined natural and Frost Walker ice formation flag retained for migration.
    • SNOW_ACCUMULATION

      public static final EnvFlag SNOW_ACCUMULATION
      Controls snow accumulation.
    • SNOW_MELT

      public static final EnvFlag SNOW_MELT
      Controls snow melting.
    • TRAMPLE

      public static final EnvFlag TRAMPLE
      Controls player trampling of farmland.
    • MOB_TRAMPLE

      public static final EnvFlag MOB_TRAMPLE
      Controls non-player entities trampling farmland.
    • DECAY

      public static final EnvFlag DECAY
      Controls leaf decay.
    • HOPPER_OUTSIDE

      public static final EnvFlag HOPPER_OUTSIDE
      Controls an outside hopper pulling from containers in the dominion.
    • PISTON_OUTSIDE

      public static final EnvFlag PISTON_OUTSIDE
      Controls pistons crossing the dominion boundary.
    • TRIG_PRESSURE_PROJ

      public static final EnvFlag TRIG_PRESSURE_PROJ
      Controls projectile-triggered pressure plates.
    • TRIG_PRESSURE_MOB

      public static final EnvFlag TRIG_PRESSURE_MOB
      Controls mob-triggered pressure plates.
    • TRIG_PRESSURE_DROP

      public static final EnvFlag TRIG_PRESSURE_DROP
      Controls dropped-item-triggered pressure plates.
    • ITEM_FRAME_PROJ_DAMAGE

      @Deprecated public static final EnvFlag ITEM_FRAME_PROJ_DAMAGE
      Deprecated.
      The former coarse hanging-entity projectile flag. It is retained as a migration source for existing configuration and database columns, but is not registered as an active flag anymore.
    • ARMOR_STAND_MOB_DAMAGE

      public static final EnvFlag ARMOR_STAND_MOB_DAMAGE
      Controls non-player entities damaging armor stands.
    • HANGING_ENTITY_MOB_DAMAGE

      public static final EnvFlag HANGING_ENTITY_MOB_DAMAGE
      Controls non-player entities damaging hanging entities.
    • ARMOR_STAND_EXPLOSION_DAMAGE

      @Deprecated public static final EnvFlag ARMOR_STAND_EXPLOSION_DAMAGE
      Deprecated.
      Former source-agnostic explosion damage flag retained for migration.
    • HANGING_ENTITY_EXPLOSION_DAMAGE

      @Deprecated public static final EnvFlag HANGING_ENTITY_EXPLOSION_DAMAGE
      Deprecated.
      Former source-agnostic explosion damage flag retained for migration.
    • MOB_DROP_ITEM

      public static final EnvFlag MOB_DROP_ITEM
      Controls whether mobs drop items when killed.
    • SHOW_BORDER

      public static final EnvFlag SHOW_BORDER
      Controls whether a dominion border is shown to entering players.
    • ADMIN

      public static final PriFlag ADMIN
      Allows managing ordinary members and groups.
    • RESIZE

      public static final PriFlag RESIZE
      Allows resizing a dominion.
    • RENAME

      public static final PriFlag RENAME
      Allows renaming a dominion.
    • CREATE_SUB

      public static final PriFlag CREATE_SUB
      Allows creating sub-dominions.
    • DELETE_SUB

      public static final PriFlag DELETE_SUB
      Allows deleting sub-dominions.
    • RESIZE_SUB

      public static final PriFlag RESIZE_SUB
      Allows resizing sub-dominions.
    • RENAME_SUB

      public static final PriFlag RENAME_SUB
      Allows renaming sub-dominions.
    • MOVE

      public static final PriFlag MOVE
      Controls player movement inside a dominion.
    • TELEPORT

      public static final PriFlag TELEPORT
      Controls teleportation to the dominion.
    • FLY

      public static final PriFlag FLY
      Controls creative-style flight; it does not control elytra flight.
    • RIDING

      public static final PriFlag RIDING
      Controls riding vehicles and rideable entities.
    • ENDER_PEARL

      public static final PriFlag ENDER_PEARL
      Controls throwing ender pearls.
    • RAID

      public static final PriFlag RAID
      Controls triggering raids.
    • PLACE

      public static final PriFlag PLACE
      Controls ordinary block placement.
    • PLACE_FLOWER_POT_CONTENT

      public static final PriFlag PLACE_FLOWER_POT_CONTENT
      Controls placing contents into flower pots.
    • PLACE_LIQUID

      public static final PriFlag PLACE_LIQUID
      Controls placing water and lava.
    • PLACE_ENTITY

      @Deprecated public static final PriFlag PLACE_ENTITY
      Deprecated.
      Former coarse decorative-entity placement flag retained for migration.
    • PLACE_ARMOR_STAND

      public static final PriFlag PLACE_ARMOR_STAND
      Controls placing armor stands.
    • PLACE_HANGING_ENTITY

      public static final PriFlag PLACE_HANGING_ENTITY
      Controls placing hanging entities.
    • BREAK_BLOCK

      public static final PriFlag BREAK_BLOCK
      Controls ordinary block breaking.
    • BREAK_FLOWER_POT_CONTENT

      public static final PriFlag BREAK_FLOWER_POT_CONTENT
      Controls removing contents from flower pots.
    • BREAK_LIQUID

      public static final PriFlag BREAK_LIQUID
      Controls collecting water and lava.
    • BREAK_ENTITY

      @Deprecated public static final PriFlag BREAK_ENTITY
      Deprecated.
      Former coarse decorative-entity breaking flag retained for migration.
    • ARMOR_STAND_DIRECT_BREAK

      public static final PriFlag ARMOR_STAND_DIRECT_BREAK
      Controls directly breaking armor stands.
    • ARMOR_STAND_PROJECTILE_BREAK

      public static final PriFlag ARMOR_STAND_PROJECTILE_BREAK
      Controls player-fired projectiles breaking armor stands.
    • HANGING_ENTITY_DIRECT_BREAK

      public static final PriFlag HANGING_ENTITY_DIRECT_BREAK
      Controls directly breaking hanging entities.
    • HANGING_ENTITY_PROJECTILE_BREAK

      public static final PriFlag HANGING_ENTITY_PROJECTILE_BREAK
      Controls player-fired projectiles breaking hanging entities.
    • ARMOR_STAND_PLAYER_DAMAGE

      @Deprecated public static final PriFlag ARMOR_STAND_PLAYER_DAMAGE
      Deprecated.
      Former combined player damage flag retained for migration.
    • HANGING_ENTITY_PLAYER_DAMAGE

      @Deprecated public static final PriFlag HANGING_ENTITY_PLAYER_DAMAGE
      Deprecated.
      Former combined player damage flag retained for migration.
    • IGNITE

      public static final PriFlag IGNITE
      Controls igniting fire.
    • PICK_UP

      public static final PriFlag PICK_UP
      Controls picking up dropped items.
    • DROP_ITEM

      public static final PriFlag DROP_ITEM
      Controls dropping items.
    • DOOR

      public static final PriFlag DOOR
      Controls interaction with ordinary doors.
    • TRAPDOOR

      public static final PriFlag TRAPDOOR
      Controls interaction with trapdoors.
    • FENCE_GATE

      public static final PriFlag FENCE_GATE
      Controls interaction with fence gates.
    • BUTTON

      public static final PriFlag BUTTON
      Controls clicking buttons.
    • LEVER

      public static final PriFlag LEVER
      Controls switching levers.
    • PRESSURE

      public static final PriFlag PRESSURE
      Controls player-triggered pressure plates.
    • RED_STONE_POWDER

      public static final PriFlag RED_STONE_POWDER
      Controls interaction with redstone dust.
    • REPEATER

      public static final PriFlag REPEATER
      Controls interaction with repeaters.
    • COMPARER

      public static final PriFlag COMPARER
      Controls interaction with comparators.
    • NOTE_BLOCK

      public static final PriFlag NOTE_BLOCK
      Controls interaction with note blocks.
    • CONTAINER

      @Deprecated public static final PriFlag CONTAINER
      Deprecated.
      The former coarse container flag. It is retained as a migration source for existing configuration and database columns, but is not registered as an active flag anymore.
    • CHEST

      public static final PriFlag CHEST
      Controls opening chests.
    • BARREL

      public static final PriFlag BARREL
      Controls opening barrels.
    • SHULKER_BOX

      public static final PriFlag SHULKER_BOX
      Controls opening shulker boxes.
    • ARMOR_STAND_INTERACTIVE

      public static final PriFlag ARMOR_STAND_INTERACTIVE
      Controls changing equipment on armor stands.
    • ITEM_FRAME_CONTENT

      public static final PriFlag ITEM_FRAME_CONTENT
      Controls inserting and removing items in item frames.
    • HOPPER

      public static final PriFlag HOPPER
      Controls opening hoppers.
    • DROPPER

      public static final PriFlag DROPPER
      Controls opening droppers.
    • DISPENSER

      public static final PriFlag DISPENSER
      Controls opening dispensers.
    • FURNACE

      public static final PriFlag FURNACE
      Controls opening furnaces.
    • BLAST_FURNACE

      public static final PriFlag BLAST_FURNACE
      Controls opening blast furnaces.
    • SMOKER

      public static final PriFlag SMOKER
      Controls opening smokers.
    • FLOWER_POT

      public static final PriFlag FLOWER_POT
      Controls opening flower pots.
    • COPPER_CHEST

      public static final PriFlag COPPER_CHEST
      Controls opening copper chests.
    • SHELF

      public static final PriFlag SHELF
      Controls opening shelves.
    • CRAFT

      public static final PriFlag CRAFT
      Controls using crafting tables.
    • CRAFTER

      public static final PriFlag CRAFTER
      Controls interacting with crafters.
    • ANVIL

      public static final PriFlag ANVIL
      Controls using anvils.
    • ENCHANT

      public static final PriFlag ENCHANT
      Controls using enchanting tables.
    • BREW

      public static final PriFlag BREW
      Controls using brewing stands.
    • BEACON

      public static final PriFlag BEACON
      Controls interacting with beacons.
    • JUKEBOX

      public static final PriFlag JUKEBOX
      Controls interacting with jukeboxes.
    • LECTERN

      public static final PriFlag LECTERN
      Controls interacting with lecterns.
    • BOOKSHELF

      public static final PriFlag BOOKSHELF
      Controls interacting with chiseled bookshelves.
    • DRAGON_EGG

      public static final PriFlag DRAGON_EGG
      Controls interacting with dragon eggs.
    • ITEM_FRAME_INTERACTIVE

      public static final PriFlag ITEM_FRAME_INTERACTIVE
      Controls rotating items in item frames.
    • EDIT_SIGN

      public static final PriFlag EDIT_SIGN
      Controls editing signs.
    • BED

      public static final PriFlag BED
      Controls sleeping in beds and setting a spawn point.
    • ANCHOR

      public static final PriFlag ANCHOR
      Controls setting and using respawn anchors.
    • VEHICLE_SPAWN

      public static final PriFlag VEHICLE_SPAWN
      Controls spawning vehicles.
    • VEHICLE_DESTROY

      public static final PriFlag VEHICLE_DESTROY
      Controls destroying vehicles.
    • HARVEST

      public static final PriFlag HARVEST
      Controls harvesting crops.
    • SOWING

      public static final PriFlag SOWING
      Controls planting crops.
    • FERTILIZER

      public static final PriFlag FERTILIZER
      Controls using bone meal and other fertilizer.
    • PLANT_TREE

      public static final PriFlag PLANT_TREE
      Controls planting saplings and similar tree plants.
    • FEED

      public static final PriFlag FEED
      Controls feeding animals.
    • SHEAR

      public static final PriFlag SHEAR
      Controls shearing sheep.
    • LEASH

      public static final PriFlag LEASH
      Controls leashing entities.
    • DYE

      public static final PriFlag DYE
      Controls dyeing animals and their accessories.
    • HONEY

      public static final PriFlag HONEY
      Controls collecting honey from hives.
    • CAKE

      public static final PriFlag CAKE
      Controls eating cake.
    • TRADE

      public static final PriFlag TRADE
      Controls trading with villagers.
    • PROJECTILE_CHARGE

      public static final PriFlag PROJECTILE_CHARGE
      Controls charging bows and crossbows.
    • ARROW_LAUNCH

      public static final PriFlag ARROW_LAUNCH
      Controls launching arrows.
    • ARROW_HIT

      public static final PriFlag ARROW_HIT
      Controls impacts caused by player-fired arrows.
    • ARROW_DAMAGE

      public static final PriFlag ARROW_DAMAGE
      Controls damage caused by player-fired arrows.
    • SHOOT

      @Deprecated public static final PriFlag SHOOT
      Deprecated.
      Former combined bow/crossbow and arrow flag retained for migration.
    • TRIDENT_LAUNCH

      public static final PriFlag TRIDENT_LAUNCH
      Controls launching tridents.
    • TRIDENT_HIT

      public static final PriFlag TRIDENT_HIT
      Controls impacts caused by player-fired tridents.
    • TRIDENT

      @Deprecated public static final PriFlag TRIDENT
      Deprecated.
      Former combined trident launch and impact flag retained for migration.
    • FIREBALL_LAUNCH

      public static final PriFlag FIREBALL_LAUNCH
      Controls launching fireballs.
    • FIREBALL_HIT

      public static final PriFlag FIREBALL_HIT
      Controls impacts caused by player-fired fireballs.
    • FIREBALL

      @Deprecated public static final PriFlag FIREBALL
      Deprecated.
      Former combined fireball launch and impact flag retained for migration.
    • WIND_CHARGE_LAUNCH

      public static final PriFlag WIND_CHARGE_LAUNCH
      Controls launching wind charges.
    • WIND_CHARGE_HIT

      public static final PriFlag WIND_CHARGE_HIT
      Controls impacts caused by player-fired wind charges.
    • WIND_CHARGE_EXPLODE

      public static final PriFlag WIND_CHARGE_EXPLODE
      Controls explosions caused by player-fired wind charges.
    • WIND_CHARGE

      @Deprecated public static final PriFlag WIND_CHARGE
      Deprecated.
      Former combined wind charge launch, impact and explosion flag retained for migration.
    • EGG

      public static final PriFlag EGG
      Controls throwing eggs.
    • HOOK

      public static final PriFlag HOOK
      Controls using fishing rods.
    • PVP

      public static final PriFlag PVP
      Controls player-versus-player damage.
    • MONSTER_KILLING

      public static final PriFlag MONSTER_KILLING
      Controls damaging monsters.
    • ANIMAL_KILLING

      public static final PriFlag ANIMAL_KILLING
      Controls damaging animals.
    • VILLAGER_KILLING

      public static final PriFlag VILLAGER_KILLING
      Controls damaging villagers.
  • Constructor Details

    • Flags

      public Flags()
  • Method Details

    • getAllFlags

      public static List<Flag> getAllFlags()
      Returns all active flags, including both environment and privilege flags.
      Returns:
      the active flag list; callers should treat it as read-only
    • getAllEnvFlags

      public static List<EnvFlag> getAllEnvFlags()
      Returns all active environment flags.
      Returns:
      the active environment flag list; callers should treat it as read-only
    • getAllPriFlags

      public static List<PriFlag> getAllPriFlags()
      Returns all active privilege flags.
      Returns:
      the active privilege flag list; callers should treat it as read-only
    • getAllEnvFlagsEnable

      public static List<EnvFlag> getAllEnvFlagsEnable()
      Returns all enabled environment flags.
      Returns:
      a new list containing the enabled environment flags
    • getAllPriFlagsEnable

      public static List<PriFlag> getAllPriFlagsEnable()
      Returns all enabled privilege flags.
      Returns:
      a new list containing the enabled privilege flags
    • getAllFlagsEnable

      public static List<Flag> getAllFlagsEnable()
      Returns all enabled environment and privilege flags.
      Returns:
      a new list containing the enabled flags
    • getFlag

      public static Flag getFlag(String name)
      Finds an active flag by its stable name.
      Parameters:
      name - the name of the flag
      Returns:
      the flag with the given name, or null if not found
    • getEnvFlag

      public static EnvFlag getEnvFlag(String name)
      Finds an active environment flag by its stable name.
      Parameters:
      name - the name of the environment flag
      Returns:
      the environment flag with the given name, or null if not found
    • getPreFlag

      public static PriFlag getPreFlag(String name)
      Finds an active privilege flag by its stable name.
      Parameters:
      name - the name of the privilege flag
      Returns:
      the privilege flag with the given name, or null if not found
    • registerEnvFlag

      public static boolean registerEnvFlag(org.bukkit.plugin.java.JavaPlugin plugin, EnvFlag flag)
      Registers a custom environment flag.

      Call applyChanges() after registration so the new flag and its configured groups are applied asynchronously.

      Parameters:
      plugin - the plugin registering the flag
      flag - the environment flag to register
      Returns:
      true if the flag was accepted by the registration event, false if the event was cancelled
    • registerPriFlag

      public static boolean registerPriFlag(org.bukkit.plugin.java.JavaPlugin plugin, PriFlag flag)
      Registers a custom privilege flag.

      Call applyChanges() after registration so the new flag and its configured groups are applied asynchronously.

      Parameters:
      plugin - the plugin registering the flag
      flag - the privilege flag to register
      Returns:
      true if the flag was accepted by the registration event, false if the event was cancelled
    • applyChanges

      public static CompletableFuture<Void> applyChanges()
      Queues pending custom flag and flag-group changes for application. Use the returned future to observe completion of the asynchronous pass. Calls made in the same server tick may be coalesced.
      Returns:
      a future completed after the pending changes have been applied
    • applyNewCustomFlags

      @Deprecated public static void applyNewCustomFlags() throws Exception
      Deprecated.
      use applyChanges() and observe the returned future
      Queues registered flag and flag-group changes for application without exposing the completion future.
      Throws:
      Exception - retained for source compatibility; current implementations report asynchronous failures through the returned future of applyChanges()
    • getRevision

      public static long getRevision()
      Gets the revision of the active custom-flag registry.
      Returns:
      the current flag revision
    • getLegacySource

      @Internal public static Flag getLegacySource(Flag flag)
      Returns the legacy flag whose value should seed a newly split flag.
      Parameters:
      flag - the active flag being migrated
      Returns:
      the legacy source flag, or null when no source exists
    • getLegacySources

      @Internal public static List<Flag> getLegacySources(Flag flag)
      Returns all legacy flags whose values should seed a newly split flag. Most split flags have one source. The historical burn flag is included as a fallback for installations that never had the intermediate burn_entity column.
      Parameters:
      flag - the active flag being migrated
      Returns:
      the legacy source flags, in fallback order
    • preserveAllowedSpawnEggValue

      @Internal public static boolean preserveAllowedSpawnEggValue(Flag flag)
      Checks whether migration should preserve a spawn-egg flag's existing allowed value instead of applying the normal legacy default.
      Parameters:
      flag - the flag being migrated
      Returns:
      true for animal and monster spawn-egg flags