Record Class Permission.HasCommandLevel
java.lang.Object
java.lang.Record
net.minecraft.server.permissions.Permission.HasCommandLevel
- All Implemented Interfaces:
Permission
- Enclosing interface:
Permission
public static record Permission.HasCommandLevel(PermissionLevel level)
extends Record
implements Permission
-
Nested Class Summary
Nested classes/interfaces inherited from interface Permission
Permission.Atom, Permission.HasCommandLevel -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PermissionLevelThe field for thelevelrecord component.static final com.mojang.serialization.MapCodec<Permission.HasCommandLevel> Fields inherited from interface Permission
CODEC, FULL_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionHasCommandLevel(PermissionLevel level) Creates an instance of aHasCommandLevelrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<Permission.HasCommandLevel> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
level
The field for thelevelrecord component. -
MAP_CODEC
-
-
Constructor Details
-
HasCommandLevel
Creates an instance of aHasCommandLevelrecord class.- Parameters:
level- the value for thelevelrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfacePermission
-
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). -
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-