Class ItemConsumptionAuthenticator

java.lang.Object
io.github.djtpj.authenticator.Authenticator<T>
io.github.djtpj.authenticator.authenticators.PlayerAuthenticator<org.bukkit.event.player.PlayerItemConsumeEvent>
io.github.djtpj.authenticator.authenticators.ItemConsumptionAuthenticator

public class ItemConsumptionAuthenticator extends PlayerAuthenticator<org.bukkit.event.player.PlayerItemConsumeEvent>
  • Constructor Details

    • ItemConsumptionAuthenticator

      public ItemConsumptionAuthenticator(SimpleTrait associatedTrait, org.bukkit.Material... materials)
      Parameters:
      associatedTrait - the ability to associate with the Authenticator
      materials - one of the food materials the player must be eating to authenticate (leave empty for all to trigger)
  • Method Details

    • authenticate

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