Enum Interaction

java.lang.Object
java.lang.Enum<Interaction>
io.github.bakedlibs.dough.protection.Interaction
All Implemented Interfaces:
Serializable, Comparable<Interaction>, java.lang.constant.Constable

public enum Interaction extends Enum<Interaction>
This enum contains the different types of actions that a ProtectionModule can protect against.
Author:
TheBusyBiscuit
See Also:
  • Enum Constant Details

    • BREAK_BLOCK

      public static final Interaction BREAK_BLOCK
      This represents a Player (posibly offline) trying to break a Block.
    • PLACE_BLOCK

      public static final Interaction PLACE_BLOCK
      This represents a Player (posibly offline) trying to place a Block.
    • INTERACT_BLOCK

      public static final Interaction INTERACT_BLOCK
      This represents a Player (posibly offline) trying to access an Inventory.
    • ATTACK_PLAYER

      public static final Interaction ATTACK_PLAYER
      This represents a Player trying to attack another Player.
    • ATTACK_ENTITY

      public static final Interaction ATTACK_ENTITY
      This represents a Player trying to attack an Entity, either an Animals or a Monster.
    • INTERACT_ENTITY

      public static final Interaction INTERACT_ENTITY
      This represents a Player trying to interact with an Entity. This could be a Sheep that is getting dyed, or a Villager being traded with.
  • Method Details

    • values

      public static Interaction[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Interaction valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getType

      @Nonnull public ActionType getType()
      This checks whether this Interaction involves a Block or not.
      Returns:
      Whether this Interaction involves a Block