Interface ConfigurationContainer
@NonExtendable
public interface ConfigurationContainer
- Since:
- 0.3.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescription<T> Optional<Configuration<T>>
Gets configuration from the key<T> T
getOrDefault
(String key, Class<T> type, T defaultValue) Gets the value from configuration or returns back the default value@Nullable ConfigurationContainer
Gets all keys known by this configuration container<T> boolean
Registers new configuration type.
-
Field Details
-
COMPASS
- See Also:
-
JOIN_RANDOM_TEAM_AFTER_LOBBY
- See Also:
-
JOIN_RANDOM_TEAM_ON_JOIN
- See Also:
-
ADD_WOOL_TO_INVENTORY_ON_JOIN
- See Also:
-
PROTECT_SHOP
- See Also:
-
PLAYER_DROPS
- See Also:
-
FRIENDLY_FIRE
- See Also:
-
COLORED_LEATHER_BY_TEAM_IN_LOBBY
- See Also:
-
KEEP_INVENTORY
- See Also:
-
KEEP_ARMOR
- See Also:
-
CRAFTING
- See Also:
-
LOBBY_BOSSBAR
- See Also:
-
GAME_BOSSBAR
- See Also:
-
GAME_SCOREBOARD
- See Also:
-
LOBBY_SCOREBOARD
- See Also:
-
PREVENT_SPAWNING_MOBS
- See Also:
-
SPAWNER_HOLOGRAMS
- See Also:
-
SPAWNER_DISABLE_MERGE
- See Also:
-
ENABLE_GAME_START_ITEMS
- See Also:
-
ENABLE_PLAYER_RESPAWN_ITEMS
- See Also:
-
SPAWNER_COUNTDOWN_HOLOGRAM
- See Also:
-
DAMAGE_WHEN_PLAYER_IS_NOT_IN_ARENA
- See Also:
-
REMOVE_UNUSED_TARGET_BLOCKS
- See Also:
-
BLOCK_FALLING
- See Also:
-
HOLOGRAMS_ABOVE_BEDS
- See Also:
-
SPECTATOR_JOIN
- See Also:
-
STOP_TEAM_SPAWNERS_ON_DIE
- See Also:
-
ANCHOR_AUTO_FILL
- See Also:
-
ANCHOR_DECREASING
- See Also:
-
CAKE_TARGET_BLOCK_EATING
- See Also:
-
TARGET_BLOCK_EXPLOSIONS
- See Also:
-
INVISIBLE_LOBBY_ON_GAME_START
- See Also:
-
HEALTH_INDICATOR
- See Also:
-
HYPIXEL_HOLOGRAMS
- See Also:
-
NEW_GAME_SCOREBOARD
- See Also:
-
-
Method Details
-
get
Gets configuration from the key- Parameters:
key
- Key of the configurationtype
- Type of the configuration- Returns:
- configuration or empty optional
-
register
Registers new configuration type. This allows addons to save information directly to game.- Parameters:
key
- Key of new configuration, it's invalid to use dots or colonstypeToBeSaved
- type which will be used for saving- Returns:
- true on success
-
getRegisteredKeys
Gets all keys known by this configuration container- Returns:
- list of all registered keys
-
getOrDefault
Gets the value from configuration or returns back the default value- Parameters:
key
- Key of the configurationtype
- Type of the configurationdefaultValue
- Default value if the configuration won't be found- Returns:
- object from configuration if registered; otherwise defaultValue
-
getParentContainer
-