Package com.massivecraft.factions.event

## Class PowerRegenEvent

- java.lang.Object
- - org.bukkit.event.Event
  - - com.massivecraft.factions.event.FactionEvent
    - - com.massivecraft.factions.event.FactionPlayerEvent
      - - com.massivecraft.factions.event.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`

### Field Summary

### Fields inherited from class com.massivecraft.factions.event.FactionPlayerEvent

`fPlayer`

### Constructor Summary

Constructors
Constructor | Description
--- | ---
`PowerRegenEvent​(Faction f, FPlayer p)` |

### 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 com.massivecraft.factions.event.FactionPlayerEvent

`getfPlayer`

### Methods inherited from class com.massivecraft.factions.event.FactionEvent

`getFaction, getHandlerList, getHandlers`

### 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

#### PowerRegenEvent

    public PowerRegenEvent​(Faction f,
                           FPlayer p)

### 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`