Package wtf.choco.veinminer.config
Class ClientConfig
java.lang.Object
wtf.choco.veinminer.config.ClientConfig
- All Implemented Interfaces:
Cloneable
Represents a simple configuration that determines a client's ability to perform certain
abilities per the server's discretion.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClientConfig.Builder
builder()
Get a newClientConfig.Builder
instance to create a newClientConfig
.clone()
@NotNull ClientConfig
edit
(Consumer<ClientConfig.Builder> editor) Edit thisClientConfig
with the givenConsumer
and return a new instance of the config with all edited values.boolean
byte
Get all boolean values from this config as a single byte bitmask.int
hashCode()
boolean
Check whether or not the activation key bind is allowed.boolean
Check whether or not the pattern switching key binds are allowed.boolean
Check whether or not the client is allowed to render a wireframe around blocks it intends on vein mining before actually vein mining.
-
Constructor Details
-
ClientConfig
public ClientConfig()Construct a newClientConfig
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
Edit thisClientConfig
with the givenConsumer
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
Get a newClientConfig.Builder
instance to create a newClientConfig
.- Returns:
- the builder instance
-
clone
-
hashCode
public int hashCode() -
equals
-