Interface IPlayerConfigClientStorageAPI
public interface IPlayerConfigClientStorageAPI
API for a player config storage on the client side
-
Method Summary
Modifier and TypeMethodDescriptionGets a sub-config of this config from a specified sub-config ID.<T extends Comparable<T>>
IPlayerConfigStringableOptionClientStorageAPI<?>getOptionStorage
(IPlayerConfigOptionSpecAPI<T> option) Gets the config option value storage for a specified config option in this config.getOwner()
Gets the UUID of the owner of this config.getSubConfig
(String id) Gets a sub-config of this config from a specified sub-config ID.Gets a stream of all sub-configs of this player config.Gets an unmodifiable list of all string IDs of this config's sub-configs.int
Gets the maximum number of sub-configs that this player config is allowed to have.int
Gets the number of sub-configs that this config has.getType()
Gets the typePlayerConfigType
of this config.boolean
Checks whether this player (sub-)config is in the process of being deleted.Gets a stream of all config option value storages for this config.boolean
Checks whether a sub-config with a specified string ID exists.
-
Method Details
-
getOptionStorage
@Nonnull <T extends Comparable<T>> IPlayerConfigStringableOptionClientStorageAPI<?> getOptionStorage(@Nonnull IPlayerConfigOptionSpecAPI<T> option) Gets the config option value storage for a specified config option in this config.All player config option types are statically accessible in
PlayerConfigOptions
.- Type Parameters:
T
- the type of the option value- Parameters:
option
- the player config option, not null- Returns:
- the value storage for the config option, not null
-
getType
Gets the typePlayerConfigType
of this config.- Returns:
- the type of this config, not null
-
getOwner
Gets the UUID of the owner of this config.- Returns:
- the UUID of the owner, null for the wilderness config
-
optionStream
Gets a stream of all config option value storages for this config.- Returns:
- the
Stream
of all config option value storages, not null
-
getSubConfigIds
Gets an unmodifiable list of all string IDs of this config's sub-configs.- Returns:
- an unmodifiable
List<String>
of sub-config IDs
-
getSubConfig
Gets 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
Gets 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
-
subConfigExists
Checks 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
-
getSubCount
int getSubCount()Gets the number of sub-configs that this config has.- Returns:
- the number of sub-configs
-
getSubConfigAPIStream
Gets a stream of all sub-configs of this player config.This must not be a sub-config in itself.
- Returns:
- a stream of all sub-configs, not null
-
isBeingDeleted
boolean isBeingDeleted()Checks 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
int getSubConfigLimit()Gets 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
-