Enum Class ConfigScope
- All Implemented Interfaces:
Serializable, Comparable<ConfigScope>, Constable
Where a config lives, which side loads it, and whether the server's values reach the clients.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLoaded only on clients, from theconfigfolder.Loaded on both sides, from theconfigfolder.Loaded on both sides from theconfigfolder; the server's values are sent to every client that joins and whenever they change.Loaded on both sides from theconfigfolder as soon as it's built, before content is registered, so its values can shape what a mod creates: which items exist, their durability, stack sizes... -
Method Summary
Modifier and TypeMethodDescriptionThe config name used when the builder doesn't set one.booleanisSynced()Whether the server's values are sent to clients.static ConfigScopeReturns the enum constant of this class with the specified name.static ConfigScope[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLIENT
Loaded only on clients, from theconfigfolder. Never synced. -
COMMON
Loaded on both sides, from theconfigfolder. Each side keeps its own values. -
SERVER
Loaded on both sides from theconfigfolder; the server's values are sent to every client that joins and whenever they change. Operators can edit them in-game. -
STARTUP
Loaded on both sides from theconfigfolder as soon as it's built, before content is registered, so its values can shape what a mod creates: which items exist, their durability, stack sizes... The values are then fixed for the session: changes are saved but take effect after a restart.Joining a server compares the values, per
StartupSync: by default a client whose values differ from the server's can't join, and is offered to adopt the server's values.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
defaultName
The config name used when the builder doesn't set one. -
isSynced
public boolean isSynced()Whether the server's values are sent to clients.
-