Package net.minecraft.command.permission
Record Class PermissionCheck.Require
java.lang.Object
java.lang.Record
net.minecraft.command.permission.PermissionCheck.Require
- Record Components:
permission-
- All Implemented Interfaces:
PermissionCheck
- Enclosing interface:
PermissionCheck
public static record PermissionCheck.Require(Permission permission)
extends Record
implements PermissionCheck
- Mappings:
Namespace Name named net/minecraft/command/permission/PermissionCheck$Requireintermediary net/minecraft/class_12090$class_12092official bbo$bnamed permissionintermediary comp_4944official c
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.command.permission.PermissionCheck
PermissionCheck.AlwaysPass, PermissionCheck.Require -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<PermissionCheck.Require> private final PermissionThe field for thepermissionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRequire(Permission permission) Creates an instance of aRequirerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallows(PermissionPredicate permissions) final booleanIndicates whether some other object is "equal to" this one.com.mojang.serialization.MapCodec<PermissionCheck.Require> getCodec()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. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/command/permission/PermissionCheck$Require;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_63195Lnet/minecraft/class_12090$class_12092;field_63195:Lcom/mojang/serialization/MapCodec;official bLbbo$b;b:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
Require
Creates an instance of aRequirerecord class.- Parameters:
permission- the value for thepermissionrecord component
-
-
Method Details
-
getCodec
- Specified by:
getCodecin interfacePermissionCheck- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/command/permission/PermissionCheck;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_75021Lnet/minecraft/class_12090;method_75021()Lcom/mojang/serialization/MapCodec;official aLbbo;a()Lcom/mojang/serialization/MapCodec;
-
allows
- Specified by:
allowsin interfacePermissionCheck- Mappings:
Namespace Name Mixin selector named allowsLnet/minecraft/command/permission/PermissionCheck;allows(Lnet/minecraft/command/permission/PermissionPredicate;)Zintermediary method_75022Lnet/minecraft/class_12090;method_75022(Lnet/minecraft/class_12096;)Zofficial aLbbo;a(Lbbs;)Z
-
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
-