Class ClientConfig

java.lang.Object
wtf.choco.veinminer.config.ClientConfig
All Implemented Interfaces:
Cloneable

public final class ClientConfig extends Object implements Cloneable
Represents a simple configuration that determines a client's ability to perform certain abilities per the server's discretion.
  • Constructor Details

    • ClientConfig

      public ClientConfig()
      Construct a new ClientConfig with default values.
  • Method Details

    • isAllowActivationKeybind

      public boolean isAllowActivationKeybind()
      Check whether or not the activation key bind is allowed.
      Returns:
      true if allowed, false otherwise
    • isAllowPatternSwitchingKeybind

      public boolean isAllowPatternSwitchingKeybind()
      Check whether or not the pattern switching key binds are allowed.
      Returns:
      true if allowed, false otherwise
    • isAllowWireframeRendering

      public boolean isAllowWireframeRendering()
      Check whether or not the client is allowed to render a wireframe around blocks it intends on vein mining before actually vein mining.
      Returns:
      true if allowed, false otherwise
    • getBooleanValuesAsBitmask

      public byte getBooleanValuesAsBitmask()
      Get all boolean values from this config as a single byte bitmask.

      0x01: isAllowActivationKeybind()
      0x02: isAllowPatternSwitchingKeybind()
      0x04: isAllowWireframeRendering()

      Returns:
      the config bitmask
    • edit

      @NotNull public @NotNull ClientConfig edit(Consumer<ClientConfig.Builder> editor)
      Edit this ClientConfig with the given Consumer and return a new instance of the config with all edited values. This operation is immutable and will not modify this instance of the config.
      Parameters:
      editor - the editor
      Returns:
      the newly edited ClientConfig instance
    • builder

      @NotNull public static ClientConfig.Builder builder()
      Get a new ClientConfig.Builder instance to create a new ClientConfig.
      Returns:
      the builder instance
    • clone

      public ClientConfig clone()
      Overrides:
      clone in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object