Class InteractAuthenticator

java.lang.Object
io.github.djtpj.authenticator.Authenticator<T>
io.github.djtpj.authenticator.authenticators.PlayerAuthenticator<org.bukkit.event.player.PlayerInteractEvent>
io.github.djtpj.authenticator.authenticators.InteractAuthenticator
Direct Known Subclasses:
ItemInteractionAuthenticator, MaterialInteractionAuthenticator

public class InteractAuthenticator extends PlayerAuthenticator<org.bukkit.event.player.PlayerInteractEvent>
Authenticates an Interact Event
  • Constructor Details

    • InteractAuthenticator

      public InteractAuthenticator(boolean requiresSneaking, boolean requiresItem, Trait trait, org.bukkit.event.block.Action... actions)
      Parameters:
      requiresSneaking - whether the player needs to be sneaking
      requiresItem - whether the item must be non-placeable, edible, or interactable to trigger the event
      trait - the associated trait
      actions - the acceptable actions
  • Method Details

    • authenticate

      public boolean authenticate(org.bukkit.event.player.PlayerInteractEvent event)
      Description copied from class: Authenticator
      Verifies weather a trait should run on an event
      Overrides:
      authenticate in class PlayerAuthenticator<org.bukkit.event.player.PlayerInteractEvent>
      Parameters:
      event - The event to authenticate
      Returns:
      whether a trait should run on this event