Class FlagsFile

java.lang.Object
me.tayebyassine.homestead.resources.ResourceFile
me.tayebyassine.homestead.resources.files.FlagsFile

public final class FlagsFile extends ResourceFile
Typed accessor for flags.yml.
  • Constructor Details

  • Method Details

    • isFlagDisabled

      public boolean isFlagDisabled(String flag)
      Checks whether a specific flag has been disabled by the server admin.
      Parameters:
      flag - the flag name to check
      Returns:
      true if the flag is in the disabled list
    • doSpawnersIgnoreSpawnFlags

      public boolean doSpawnersIgnoreSpawnFlags()
      Whether spawners should ignore the spawn-limit flag.
      Returns:
      true if spawners are excluded, defaults to true
    • allowFlagsOnPlayerTrust

      public boolean allowFlagsOnPlayerTrust()
      Whether all flags should be automatically granted to trusted members.
      Returns:
      true if trusted players get all flags, defaults to true
    • getDefaultPlayerFlags

      public long getDefaultPlayerFlags()
      Computes the bitmask of default player flags defined in the config.
      Returns:
      combined default player flags, or 0L if none are set
    • getAllAllowedPlayerFlagsExcludeDisabledOnes

      public long getAllAllowedPlayerFlagsExcludeDisabledOnes()
      Computes the bitmask of every player flag that is not disabled.
      Returns:
      combined allowed player flags
    • getDefaultWorldFlags

      public long getDefaultWorldFlags()
      Computes the bitmask of default world flags defined in the config.
      Returns:
      combined default world flags, or 0L if none are set
    • getAllAllowedWorldFlagsExcludeDisabledOnes

      public long getAllAllowedWorldFlagsExcludeDisabledOnes()
      Computes the bitmask of every world flag that is not disabled.
      Returns:
      combined allowed world flags
    • isWorldRulesEnabled

      public boolean isWorldRulesEnabled()
      Whether the world-rules override system is enabled.
      Returns:
      true if world rules are active, defaults to false
    • getWorldPlayerFlags

      public long getWorldPlayerFlags(String worldName)
      The player-flags bitmask for a specific world, or -1L if the world has no override.
      Parameters:
      worldName - the Bukkit world name
      Returns:
      the player-flags bitmask, or -1L
    • getWorldWorldFlags

      public long getWorldWorldFlags(String worldName)
      The world-flags bitmask for a specific world, or -1L if the world has no override.
      Parameters:
      worldName - the Bukkit world name
      Returns:
      the world-flags bitmask, or -1L