Package net.minestom.server.registry
Record Class Registry.DamageTypeEntry
java.lang.Object
java.lang.Record
net.minestom.server.registry.Registry.DamageTypeEntry
- All Implemented Interfaces:
Registry.Entry
- Enclosing class:
Registry
public static record Registry.DamageTypeEntry(NamespaceID namespace, float exhaustion, String messageId, String scaling, @Nullable String effects, @Nullable String deathMessageType, Registry.Properties custom)
extends Record
implements Registry.Entry
-
Constructor Summary
ConstructorDescriptionDamageTypeEntry
(String namespace, Registry.Properties main, Registry.Properties custom) DamageTypeEntry
(NamespaceID namespace, float exhaustion, String messageId, String scaling, @Nullable String effects, @Nullable String deathMessageType, Registry.Properties custom) Creates an instance of aDamageTypeEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptioncustom()
Returns the value of thecustom
record component.@Nullable String
Returns the value of thedeathMessageType
record component.@Nullable String
effects()
Returns the value of theeffects
record component.final boolean
Indicates whether some other object is "equal to" this one.float
Returns the value of theexhaustion
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of themessageId
record component.Returns the value of thenamespace
record component.scaling()
Returns the value of thescaling
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DamageTypeEntry
-
DamageTypeEntry
public DamageTypeEntry(NamespaceID namespace, float exhaustion, String messageId, String scaling, @Nullable @Nullable String effects, @Nullable @Nullable String deathMessageType, Registry.Properties custom) Creates an instance of aDamageTypeEntry
record class.- Parameters:
namespace
- the value for thenamespace
record componentexhaustion
- the value for theexhaustion
record componentmessageId
- the value for themessageId
record componentscaling
- the value for thescaling
record componenteffects
- the value for theeffects
record componentdeathMessageType
- the value for thedeathMessageType
record componentcustom
- the value for thecustom
record component
-
-
Method Details
-
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 '=='. -
namespace
Returns the value of thenamespace
record component.- Returns:
- the value of the
namespace
record component
-
exhaustion
public float exhaustion()Returns the value of theexhaustion
record component.- Returns:
- the value of the
exhaustion
record component
-
messageId
Returns the value of themessageId
record component.- Returns:
- the value of the
messageId
record component
-
scaling
Returns the value of thescaling
record component.- Returns:
- the value of the
scaling
record component
-
effects
Returns the value of theeffects
record component.- Returns:
- the value of the
effects
record component
-
deathMessageType
Returns the value of thedeathMessageType
record component.- Returns:
- the value of the
deathMessageType
record component
-
custom
Returns the value of thecustom
record component.- Specified by:
custom
in interfaceRegistry.Entry
- Returns:
- the value of the
custom
record component
-