Package net.minestom.server.featureflag
Record Class FeatureFlagImpl
java.lang.Object
java.lang.Record
net.minestom.server.featureflag.FeatureFlagImpl
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed,FeatureFlag,ProtocolObject,StaticProtocolObject
public record FeatureFlagImpl(Registry.FeatureFlagEntry registry, NamespaceID namespace, int id)
extends Record
implements FeatureFlag
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FeatureFlagstatic final FeatureFlagstatic final FeatureFlagstatic final FeatureFlag -
Constructor Summary
ConstructorsConstructorDescriptionFeatureFlagImpl(Registry.FeatureFlagEntry registry, NamespaceID namespace, int id) Creates an instance of aFeatureFlagImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static FeatureFlagfinal inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.Returns the value of thenamespacerecord component.registry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minestom.server.registry.ProtocolObject
key, name
-
Field Details
-
UPDATE_1_21
-
BUNDLE
-
VANILLA
-
TRADE_REBALANCE
-
-
Constructor Details
-
FeatureFlagImpl
Creates an instance of aFeatureFlagImplrecord class.- Parameters:
registry- the value for theregistryrecord componentnamespace- the value for thenamespacerecord componentid- the value for theidrecord component
-
-
Method Details
-
get
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
registry
Returns the value of theregistryrecord component.- Specified by:
registryin interfaceFeatureFlag- Returns:
- the value of the
registryrecord component
-
namespace
Returns the value of thenamespacerecord component.- Specified by:
namespacein interfaceFeatureFlag- Specified by:
namespacein interfaceProtocolObject- Returns:
- the value of the
namespacerecord component
-
id
public int id()Returns the value of theidrecord component.- Specified by:
idin interfaceStaticProtocolObject- Returns:
- the value of the
idrecord component
-