Interface IPlayerConfigAPI
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.switch toIPlayerConfigAPI<T extends Comparable<T>>
TgetDefaultRawValue(IPlayerConfigOptionSpecAPI<T> option) Deprecated.switch toIPlayerConfigAPI<T extends Comparable<T>>
TgetEffective(IPlayerConfigOptionSpecAPI<T> option) Deprecated.switch toIPlayerConfigAPIgetEffectiveSubConfig(int subIndex) Deprecated.switch toIPlayerConfigAPIDeprecated.switch toIPlayerConfigAPI<T extends Comparable<T>>
TgetFromEffectiveConfig(IPlayerConfigOptionSpecAPI<T> option) Deprecated.switch toIPlayerConfigAPIDeprecated.switch toIPlayerConfigAPI<T extends Comparable<T>>
TDeprecated.switch toIPlayerConfigAPIgetSubConfig(String id) Deprecated.switch toIPlayerConfigAPIDeprecated.switch toIPlayerConfigAPIDeprecated.switch toIPlayerConfigAPIintDeprecated.switch toIPlayerConfigAPIintDeprecated.switch toIPlayerConfigAPIgetSubId()Deprecated.switch toIPlayerConfigAPIintDeprecated.switch toIPlayerConfigAPIgetType()Deprecated.switch toIPlayerConfigAPIDeprecated.switch toIPlayerConfigAPIDeprecated.switch toIPlayerConfigAPIbooleanDeprecated.switch toIPlayerConfigAPIbooleanisOptionAllowed(IPlayerConfigOptionSpecAPI<?> option) Deprecated.switch toIPlayerConfigAPIbooleansubConfigExists(int subIndex) Deprecated.switch toIPlayerConfigAPIbooleanDeprecated.switch toIPlayerConfigAPI<T extends Comparable<T>>
IPlayerConfigAPI.SetResulttryToReset(IPlayerConfigOptionSpecAPI<T> option) Deprecated.switch toIPlayerConfigAPI<T extends Comparable<T>>
IPlayerConfigAPI.SetResulttryToSet(IPlayerConfigOptionSpecAPI<T> option, T value) Deprecated.switch toIPlayerConfigAPI
-
Method Details
-
getPlayerId
Deprecated.switch toIPlayerConfigAPIGets the UUID of the player that this config is for.
- Returns:
- the UUID of the config owner, null if wilderness
-
tryToSet
@Deprecated <T extends Comparable<T>> IPlayerConfigAPI.SetResult tryToSet(@Nonnull IPlayerConfigOptionSpecAPI<T> option, @Nullable T value) Deprecated.switch toIPlayerConfigAPITries to set the value of a specified config option to a specified value.
This won't succeed if the specified option is forced to the default config value (by the server mod config) or if the specified value isn't valid for the specified option. In any case, you will receive a
IPlayerConfigAPI.SetResult.All player config option types are statically accessible in
PlayerConfigOptions.- Type Parameters:
T- the type of the option value- Parameters:
option- the type of the option to set, not nullvalue- the value to set the option to, can be null but won't be accepted- Returns:
- the result type of this action
-
getEffective
Deprecated.switch toIPlayerConfigAPIGets the effective value of a config option.
This method calculates the automatic option value if such is used, e.g. the claims color, while
getFromEffectiveConfig(xaero.pac.common.server.player.config.api.IPlayerConfigOptionSpecAPI<T>)just gets the effective raw value.All player config option types are statically accessible in
PlayerConfigOptions.- Type Parameters:
T- the type of the option value- Parameters:
option- the type of the option, not null- Returns:
- the effective value of the option, not null
-
getFromEffectiveConfig
@Deprecated <T extends Comparable<T>> T getFromEffectiveConfig(@Nonnull IPlayerConfigOptionSpecAPI<T> option) Deprecated.switch toIPlayerConfigAPIGets the raw config value from the effective config of a config option, e.g. from the default player config for options that cannot be set per player.
This method does not calculate the automatic option value if such is used, e.g. the claims color.
All player config option types are statically accessible in
PlayerConfigOptions.- Type Parameters:
T- the type of the option value- Parameters:
option- the type of the option, not null- Returns:
- the raw effective value of the option, not null
-
getRaw
Deprecated.switch toIPlayerConfigAPIGets the raw config value from this config, which can be null in the case of sub-configs.
- Type Parameters:
T- the type of the option value- Parameters:
o- the type of the option, not null- Returns:
- the raw value of the option, can be null
-
tryToReset
@Deprecated <T extends Comparable<T>> IPlayerConfigAPI.SetResult tryToReset(@Nonnull IPlayerConfigOptionSpecAPI<T> option) Deprecated.switch toIPlayerConfigAPITries to reset the value of a specified config option to the default raw value, as in
getDefaultRawValue(xaero.pac.common.server.player.config.api.IPlayerConfigOptionSpecAPI<T>).You will receive a
IPlayerConfigAPI.SetResult.All player config option types are statically accessible in
PlayerConfigOptions.- Type Parameters:
T- the type of the option value- Parameters:
option- the type of the option to set, not null- Returns:
- the result type of this action
-
getType
Deprecated.switch toIPlayerConfigAPIGets the type
PlayerConfigTypeof this config.- Returns:
- the type of this config, not null
-
getSubConfig
Deprecated.switch toIPlayerConfigAPIGets a sub-config of this config from a specified sub-config ID.
Gets this config, if the specified sub-config ID is "main".
- Parameters:
id- the string ID of the sub-config, not null- Returns:
- the sub-config, null if it doesn't exist
-
getEffectiveSubConfig
Deprecated.switch toIPlayerConfigAPIGets a sub-config of this config from a specified sub-config ID.
Gets this config, if the specified sub-config ID is "main" or isn't used.
- Parameters:
id- the string ID of the sub-config, not null- Returns:
- the effective sub-config, not null
-
getEffectiveSubConfig
Deprecated.switch toIPlayerConfigAPIGets a sub-config of this config from a specified sub-config index.
Gets this config, if the specified sub-config index is -1 or isn't used.
- Parameters:
subIndex- the sub-config index- Returns:
- the effective sub-config, not null
-
subConfigExists
Deprecated.switch toIPlayerConfigAPIChecks whether a sub-config with a specified string ID exists.
Does not consider "main" a sub-config.
- Parameters:
id- the string ID of the sub-config, not null- Returns:
- true, if the sub-config exists, otherwise false
-
subConfigExists
Deprecated.switch toIPlayerConfigAPIChecks whether a sub-config with a specified index exists.
Does not consider "main" a sub-config.
- Parameters:
subIndex- the sub-config index- Returns:
- true, if the sub-config exists, otherwise false
-
getUsedSubConfig
Deprecated.switch toIPlayerConfigAPIGets the sub-config currently used for new claims.
- Returns:
- the sub-config, not null
-
getUsedServerSubConfig
Deprecated.switch toIPlayerConfigAPIGets the server sub-config currently used for new claims.
- Returns:
- the server sub-config, not null
-
createSubConfig
Deprecated.switch toIPlayerConfigAPICreates a new sub-config for a specified sub-config ID when possible.
The sub-config ID must be unique, at most 16 characters long and consist of A-Z, a-z, 0-9, '-', '_'.
- Parameters:
id- the sub-config ID for the creates sub-config- Returns:
- the newly creates sub-config, null if wasn't successful
-
getSubId
Deprecated.switch toIPlayerConfigAPIGets the sub-config ID of this config.
- Returns:
- the string sub-config ID of this config, null when not a sub-config
-
getSubIndex
Deprecated.switch toIPlayerConfigAPIGets the sub-config index of this config.
- Returns:
- the sub-config index of this config, -1 when not a sub-config
-
getSubCount
Deprecated.switch toIPlayerConfigAPIGets the number of sub-configs that this config has.
- Returns:
- the number of sub-configs
-
getSubConfigIds
Deprecated.switch toIPlayerConfigAPIGets an unmodifiable list of all string IDs of this config's sub-configs.
This must not be a sub-config in itself!
- Returns:
- an unmodifiable
List<String>of sub-config IDs
-
getSubConfigAPIStream
Deprecated.switch toIPlayerConfigAPIGets a stream of all sub-configs of this player config.
- Returns:
- the stream of sub-configs, not null
-
getDefaultRawValue
@Deprecated <T extends Comparable<T>> T getDefaultRawValue(@Nonnull IPlayerConfigOptionSpecAPI<T> option) Deprecated.switch toIPlayerConfigAPIGets the default raw value in this config for an option.
This does not redirect to the default player config. It gives you the actual default value for a config option. In the cause of sub-configs, the default raw value is always null.
All player config option types are statically accessible in
PlayerConfigOptions.- Type Parameters:
T- the type of the option value- Parameters:
option- the type of the option, not null- Returns:
- the default raw option value in this config, always null for sub-configs
-
isOptionAllowed
Deprecated.switch toIPlayerConfigAPIChecks whether an option is allowed in this config.
- Parameters:
option- the option type, not null- Returns:
- true, if the option is allowed, otherwise false
-
isBeingDeleted
Deprecated.switch toIPlayerConfigAPIChecks whether this player (sub-)config is in the process of being deleted.
This is typically only ever true for sub-configs.
- Returns:
- true if this player (sub-)config is in the process of being deleted, otherwise false
-
getSubConfigLimit
Deprecated.switch toIPlayerConfigAPIGets the maximum number of sub-configs that this player config is allowed to have.
Returns 0 if this is a sub-config. Returns the maximum int value if this is a server claims config.
- Returns:
- the sub-config limit
-
IPlayerConfigAPI