Class BehaviorProvider

java.lang.Object
org.reprogle.honeypot.common.providers.BehaviorProvider
Direct Known Subclasses:
Ban, Kick, Notify, Warn

public abstract class BehaviorProvider extends Object
  • Field Details

    • providerName

      protected final String providerName
    • behaviorType

      protected final BehaviorType behaviorType
    • icon

      protected final org.bukkit.Material icon
  • Constructor Details

    • BehaviorProvider

      public BehaviorProvider()
  • Method Details

    • getProviderName

      public String getProviderName()
      This should return the name of the behavior provider
      Returns:
      The name of the behavior provider
    • getBehaviorType

      public BehaviorType getBehaviorType()
      Return the type of the behavior. Currently, type has no use
      Returns:
      The name of the behavior provider
    • getIcon

      public org.bukkit.Material getIcon()
      Return the type of the behavior. Currently, type has no use
      Returns:
      The name of the behavior provider
    • equals

      public boolean equals(Object o)
      Override default equals function to provide comparison support to BehaviorProviders. Since BehaviorProviders must have unique names, this checks against name only
      Overrides:
      equals in class Object
      Parameters:
      o - The object which we are checking equality against
      Returns:
      True if the behavior providers are equal to each other
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • process

      public abstract boolean process(org.bukkit.entity.Player p, org.bukkit.block.Block block)
      A method to be executed when an action requires processing.
      Parameters:
      p - The Player who the behavior provider will process against
      block - The block object belonging to the Honeypot.
      Returns:
      Your behavior provider should return true if the processing is successful, otherwise return false.