Class FlagsFile
java.lang.Object
me.tayebyassine.homestead.resources.ResourceFile
me.tayebyassine.homestead.resources.files.FlagsFile
Typed accessor for
flags.yml.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether all flags should be automatically granted to trusted members.booleanWhether spawners should ignore the spawn-limit flag.longComputes the bitmask of every player flag that is not disabled.longComputes the bitmask of every world flag that is not disabled.longComputes the bitmask of default player flags defined in the config.longComputes the bitmask of default world flags defined in the config.longgetWorldPlayerFlags(String worldName) The player-flags bitmask for a specific world, or-1Lif the world has no override.longgetWorldWorldFlags(String worldName) The world-flags bitmask for a specific world, or-1Lif the world has no override.booleanisFlagDisabled(String flag) Checks whether a specific flag has been disabled by the server admin.booleanWhether the world-rules override system is enabled.Methods inherited from class ResourceFile
getBoolean, getBoolean, getConfig, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getIntegerList, getKeysUnderPath, getLong, getLong, getRaw, getString, getString, getStringList
-
Constructor Details
-
FlagsFile
- Throws:
FileNotFoundException
-
-
Method Details
-
isFlagDisabled
Checks whether a specific flag has been disabled by the server admin.- Parameters:
flag- the flag name to check- Returns:
trueif the flag is in the disabled list
-
doSpawnersIgnoreSpawnFlags
public boolean doSpawnersIgnoreSpawnFlags()Whether spawners should ignore the spawn-limit flag.- Returns:
trueif spawners are excluded, defaults totrue
-
allowFlagsOnPlayerTrust
public boolean allowFlagsOnPlayerTrust()Whether all flags should be automatically granted to trusted members.- Returns:
trueif trusted players get all flags, defaults totrue
-
getDefaultPlayerFlags
public long getDefaultPlayerFlags()Computes the bitmask of default player flags defined in the config.- Returns:
- combined default player flags, or
0Lif 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
0Lif 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:
trueif world rules are active, defaults tofalse
-
getWorldPlayerFlags
The player-flags bitmask for a specific world, or-1Lif the world has no override.- Parameters:
worldName- the Bukkit world name- Returns:
- the player-flags bitmask, or
-1L
-
getWorldWorldFlags
The world-flags bitmask for a specific world, or-1Lif the world has no override.- Parameters:
worldName- the Bukkit world name- Returns:
- the world-flags bitmask, or
-1L
-