Class PowerRegenEvent

  • All Implemented Interfaces:
    org.bukkit.event.Cancellable

    public class PowerRegenEvent
    extends FactionPlayerEvent
    implements org.bukkit.event.Cancellable
    Event called when a player regenerate power.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.bukkit.event.Event

        org.bukkit.event.Event.Result
    • Method Summary

      Modifier and Type Method Description
      double getCustomPower()
      Get the amount of custom power this player will gain.
      double getDefaultPowerGained()
      Get the amount of power this player will regen by default
      boolean isCancelled()  
      void setCancelled​(boolean c)  
      void setCustomPower​(java.lang.Double gain)
      Set the custom power gain for this event.
      boolean usingCustomPower()
      Get if we will be using the custom power gain instead of default.
      • Methods inherited from class org.bukkit.event.Event

        getEventName, isAsynchronous
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getDefaultPowerGained

        public double getDefaultPowerGained()
        Get the amount of power this player will regen by default
        Returns:
        power amount gained as a Double.
      • getCustomPower

        public double getCustomPower()
        Get the amount of custom power this player will gain. Ignored if less than or equal to 0.
        Returns:
        Custom power as a double
      • usingCustomPower

        public boolean usingCustomPower()
        Get if we will be using the custom power gain instead of default.
        Returns:
        If we will process the event custom returned as a Boolean.
      • setCustomPower

        public void setCustomPower​(java.lang.Double gain)
        Set the custom power gain for this event.
        Parameters:
        gain - Amount of power to be added to player.
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface org.bukkit.event.Cancellable
      • setCancelled

        public void setCancelled​(boolean c)
        Specified by:
        setCancelled in interface org.bukkit.event.Cancellable