Record Class ExtensionRuntimeCapabilities
java.lang.Object
java.lang.Record
dev.rono.igniscore.api.extension.ExtensionRuntimeCapabilities
- Record Components:
protocolEnabled- whetherExtensionIntegration.PROTOCOLis activenbtEntityEnabled- whetherExtensionIntegration.NBT_ENTITYis active
public record ExtensionRuntimeCapabilities(boolean protocolEnabled, boolean nbtEntityEnabled)
extends Record
Reports which optional integrations are available on the running server.
-
Constructor Summary
ConstructorsConstructorDescriptionExtensionRuntimeCapabilities(boolean protocolEnabled, boolean nbtEntityEnabled) Creates an instance of aExtensionRuntimeCapabilitiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionRuntimeCapabilitiesfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEnabled(ExtensionIntegration integration) booleanReturns the value of thenbtEntityEnabledrecord component.booleanReturns the value of theprotocolEnabledrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExtensionRuntimeCapabilities
public ExtensionRuntimeCapabilities(boolean protocolEnabled, boolean nbtEntityEnabled) Creates an instance of aExtensionRuntimeCapabilitiesrecord class.- Parameters:
protocolEnabled- the value for theprotocolEnabledrecord componentnbtEntityEnabled- the value for thenbtEntityEnabledrecord component
-
-
Method Details
-
allEnabled
- Returns:
- capabilities with every integration enabled (unit tests)
-
isEnabled
- Returns:
- whether the given integration is available
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
protocolEnabled
public boolean protocolEnabled()Returns the value of theprotocolEnabledrecord component.- Returns:
- the value of the
protocolEnabledrecord component
-
nbtEntityEnabled
public boolean nbtEntityEnabled()Returns the value of thenbtEntityEnabledrecord component.- Returns:
- the value of the
nbtEntityEnabledrecord component
-