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$Require
intermediary net/minecraft/class_12090$class_12092
official bbo$b
named permission
intermediary comp_4944
official c
  • Field Details

    • permission

      private final Permission permission
      The field for the permission record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<PermissionCheck.Require> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/command/permission/PermissionCheck$Require;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_63195 Lnet/minecraft/class_12090$class_12092;field_63195:Lcom/mojang/serialization/MapCodec;
      official b Lbbo$b;b:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • Require

      public Require(Permission permission)
      Creates an instance of a Require record class.
      Parameters:
      permission - the value for the permission record component
  • Method Details

    • getCodec

      public com.mojang.serialization.MapCodec<PermissionCheck.Require> getCodec()
      Specified by:
      getCodec in interface PermissionCheck
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/command/permission/PermissionCheck;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_75021 Lnet/minecraft/class_12090;method_75021()Lcom/mojang/serialization/MapCodec;
      official a Lbbo;a()Lcom/mojang/serialization/MapCodec;
    • allows

      public boolean allows(PermissionPredicate permissions)
      Specified by:
      allows in interface PermissionCheck
      Mappings:
      Namespace Name Mixin selector
      named allows Lnet/minecraft/command/permission/PermissionCheck;allows(Lnet/minecraft/command/permission/PermissionPredicate;)Z
      intermediary method_75022 Lnet/minecraft/class_12090;method_75022(Lnet/minecraft/class_12096;)Z
      official a Lbbo;a(Lbbs;)Z
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • permission

      public Permission permission()
      Returns the value of the permission record component.
      Returns:
      the value of the permission record component