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.
-
-
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 defaultboolean
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
-
-
-
-
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 interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean c)
- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
-