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 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 PermissionCheck
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionRequire(Permission permission) Creates an instance of aRequirerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(PermissionSet source) 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
-
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). -
permission
Returns the value of thepermissionrecord component.- Returns:
- the value of the
permissionrecord component
-