Enum Class ConfigScope

java.lang.Object
java.lang.Enum<ConfigScope>
net.ixdarklord.coolcatcore.api.config.ConfigScope
All Implemented Interfaces:
Serializable, Comparable<ConfigScope>, Constable

public enum ConfigScope extends Enum<ConfigScope>
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 Constants
    Enum Constant
    Description
    Loaded only on clients, from the config folder.
    Loaded on both sides, from the config folder.
    Loaded on both sides from the config folder; the server's values are sent to every client that joins and whenever they change.
    Loaded on both sides from the config folder 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 Type
    Method
    Description
    The config name used when the builder doesn't set one.
    boolean
    Whether the server's values are sent to clients.
    Returns the enum constant of this class with the specified name.
    static ConfigScope[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CLIENT

      public static final ConfigScope CLIENT
      Loaded only on clients, from the config folder. Never synced.
    • COMMON

      public static final ConfigScope COMMON
      Loaded on both sides, from the config folder. Each side keeps its own values.
    • SERVER

      public static final ConfigScope SERVER
      Loaded on both sides from the config folder; the server's values are sent to every client that joins and whenever they change. Operators can edit them in-game.
    • STARTUP

      public static final ConfigScope STARTUP
      Loaded on both sides from the config folder 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

      public static ConfigScope[] 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

      public static ConfigScope valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • defaultName

      public String 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.