Record Class WorldFluids.Placement
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.paper.WorldFluids.Placement
- Enclosing class:
WorldFluids
public static record WorldFluids.Placement(boolean allowed, @Nullable net.kyori.adventure.text.Component reason)
extends Record
Whether a fluid may go somewhere, and if not, why.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlacement(boolean allowed, @Nullable net.kyori.adventure.text.Component reason) Creates an instance of aPlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowed()Returns the value of theallowedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable net.kyori.adventure.text.Componentreason()Returns the value of thereasonrecord component.static @NotNull WorldFluids.Placementrefused(@NotNull net.kyori.adventure.text.Component reason) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ALLOWED
-
-
Constructor Details
-
Placement
public Placement(boolean allowed, @Nullable @Nullable net.kyori.adventure.text.Component reason) Creates an instance of aPlacementrecord class.- Parameters:
allowed- the value for theallowedrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
refused
@NotNull public static @NotNull WorldFluids.Placement refused(@NotNull @NotNull net.kyori.adventure.text.Component reason) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
allowed
public boolean allowed()Returns the value of theallowedrecord component.- Returns:
- the value of the
allowedrecord component
-
reason
@Nullable public @Nullable net.kyori.adventure.text.Component reason()Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-