Record Class MachineError.MissingResource
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.error.MachineError.MissingResource
- All Implemented Interfaces:
MachineError
- Enclosing interface:
MachineError
public static record MachineError.MissingResource(@NotNull net.kyori.adventure.key.Key registry, @NotNull net.kyori.adventure.key.Key id)
extends Record
implements MachineError
Something referenced by key is not registered (e.g. data written by a removed addon).
-
Nested Class Summary
Nested classes/interfaces inherited from interface MachineError
MachineError.Generic, MachineError.InsufficientResource, MachineError.InvalidConfiguration, MachineError.InvalidDefinition, MachineError.MissingResource, MachineError.SerializationError, MachineError.TransferRejected, MachineError.WrongThread -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMissingResource(@NotNull net.kyori.adventure.key.Key registry, @NotNull net.kyori.adventure.key.Key id) Creates an instance of aMissingResourcerecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.key.Keycode()Stable machine-readable code, e.g.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull net.kyori.adventure.key.Keyid()Returns the value of theidrecord component.@NotNull Stringmessage()@NotNull net.kyori.adventure.key.Keyregistry()Returns the value of theregistryrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface MachineError
context, format
-
Field Details
-
CODE
public static final net.kyori.adventure.key.Key CODE
-
-
Constructor Details
-
MissingResource
public MissingResource(@NotNull @NotNull net.kyori.adventure.key.Key registry, @NotNull @NotNull net.kyori.adventure.key.Key id) Creates an instance of aMissingResourcerecord class.- Parameters:
registry- the value for theregistryrecord componentid- the value for theidrecord component
-
-
Method Details
-
code
@NotNull public @NotNull net.kyori.adventure.key.Key code()Description copied from interface:MachineErrorStable machine-readable code, e.g.machineengine:insufficient_resource.- Specified by:
codein interfaceMachineError
-
message
- Specified by:
messagein interfaceMachineError
-
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 withObjects::equals(Object,Object). -
registry
@NotNull public @NotNull net.kyori.adventure.key.Key registry()Returns the value of theregistryrecord component.- Returns:
- the value of the
registryrecord component
-
id
@NotNull public @NotNull net.kyori.adventure.key.Key id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-