Package net.minecraft.server.permissions
Record Class PermissionCheck.Require
java.lang.Object
java.lang.Record
net.minecraft.server.permissions.PermissionCheck.Require
- All Implemented Interfaces:
PermissionCheck
- Enclosing interface:
PermissionCheck
public static record PermissionCheck.Require(Permission permission)
extends Record
implements PermissionCheck
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.permissions.PermissionCheck
PermissionCheck.AlwaysPass, PermissionCheck.Require -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<PermissionCheck.Require> private final PermissionThe field for thepermissionrecord component.Fields inherited from interface net.minecraft.server.permissions.PermissionCheck
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionRequire(Permission permission) Creates an instance of aRequirerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(PermissionSet p_455635_) com.mojang.serialization.MapCodec<PermissionCheck.Require> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepermissionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
permission
The field for thepermissionrecord component. -
MAP_CODEC
-
-
Constructor Details
-
Require
Creates an instance of aRequirerecord class.- Parameters:
permission- the value for thepermissionrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfacePermissionCheck
-
check
- Specified by:
checkin interfacePermissionCheck
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
permission
Returns the value of thepermissionrecord component.- Returns:
- the value of the
permissionrecord component
-