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.getMain()Gets the main config whether this is a sub-config or not.getOption(IPlayerConfigOptionSpecAPI<T> option) Gets the config option value storage for a specified config option in this config.default <T extends Comparable<T>>
IPlayerConfigStringableOptionClientStorageAPI<?>getOptionStorage(IPlayerConfigOptionSpecAPI<T> option) Deprecated.getOwner()Gets the UUID of the owner of this config.Gets the API for the permissions the local client player has for this config.Gets the API for this config's player groups.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.intGets the maximum number of sub-configs that this player config is allowed to have.intGets the number of sub-configs that this config has.getType()Gets the typePlayerConfigTypeof this config.booleanChecks whether this player (sub-)config is in the process of being deleted.options()Gets a stream of all config option value storages for this config.default Stream<IPlayerConfigStringableOptionClientStorageAPI<?>>Deprecated.useoptions()insteadbooleanChecks whether a sub-config with a specified string ID exists.
-
Method Details
-
getOption
@Nonnull <T> IPlayerConfigStringableOptionClientStorageAPI<T> getOption(@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 typePlayerConfigTypeof 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
-
options
Gets a stream of all config option value storages for this config.- Returns:
- the
Streamof 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
-
getPlayerGroups
Gets the API for this config's player groups.- Returns:
- the player groups API for this config.
-
getMain
Gets the main config whether this is a sub-config or not.- Returns:
- this sub-config's parent main config, or this config if it is the main config
-
getPermissions
Gets the API for the permissions the local client player has for this config.- Returns:
- this config's permission API for the local client player
-
getOptionStorage
@Deprecated default <T extends Comparable<T>> IPlayerConfigStringableOptionClientStorageAPI<?> getOptionStorage(@Nonnull IPlayerConfigOptionSpecAPI<T> option) Deprecated.usegetOption(IPlayerConfigOptionSpecAPI)insteadGets 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
-
optionStream
Deprecated.useoptions()insteadGets a stream of all config option value storages for this config.
- Returns:
- the
Streamof all config option value storages, not null
-
getOption(IPlayerConfigOptionSpecAPI)instead