Package com.massivecraft.factions.event
Class PowerLossEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- com.massivecraft.factions.event.FactionEvent
-
- com.massivecraft.factions.event.FactionPlayerEvent
-
- com.massivecraft.factions.event.PowerLossEvent
-
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PowerLossEvent extends FactionPlayerEvent implements org.bukkit.event.Cancellable
Event called when a player loses power.
-
-
Field Summary
-
Fields inherited from class com.massivecraft.factions.event.FactionPlayerEvent
fPlayer
-
-
Constructor Summary
Constructors Constructor Description PowerLossEvent(Faction f, FPlayer p)
-
Method Summary
Modifier and Type Method Description doublegetCustomPowerLost()Gets the variable power lost.doublegetDefaultPowerLost()Gets the configured damage to a players individual power on deathjava.lang.StringgetFactionId()Deprecated.use getFaction().getId() instead.java.lang.StringgetFactionTag()Deprecated.use getFaction().getTag() instead.java.lang.StringgetMessage()Get the power loss message.org.bukkit.entity.PlayergetPlayer()Deprecated.use getfPlayer().getPlayer() instead.booleanisCancelled()voidsetCancelled(boolean c)voidsetCustomPowerLost(java.lang.Double loss)Sets the variable power lost.voidsetMessage(java.lang.String message)Set the power loss message.booleanusingCustomPower()Determines if custom power is to be used.-
Methods inherited from class com.massivecraft.factions.event.FactionPlayerEvent
getfPlayer
-
Methods inherited from class com.massivecraft.factions.event.FactionEvent
getFaction, getHandlerList, getHandlers
-
-
-
-
Method Detail
-
getFactionId
@Deprecated public java.lang.String getFactionId()
Deprecated.use getFaction().getId() instead.Get the id of the faction.- Returns:
- id of faction as String
-
getFactionTag
@Deprecated public java.lang.String getFactionTag()
Deprecated.use getFaction().getTag() instead.Get the tag of the faction.- Returns:
- tag of faction as String
-
getPlayer
@Deprecated public org.bukkit.entity.Player getPlayer()
Deprecated.use getfPlayer().getPlayer() instead.Get the Player involved in the event.- Returns:
- Player from FPlayer.
-
getMessage
public java.lang.String getMessage()
Get the power loss message.- Returns:
- power loss message as String.
-
setMessage
public void setMessage(java.lang.String message)
Set the power loss message.- Parameters:
message- of powerloss
-
getDefaultPowerLost
public double getDefaultPowerLost()
Gets the configured damage to a players individual power on death- Returns:
- power to be lost as a Double.
-
getCustomPowerLost
public double getCustomPowerLost()
Gets the variable power lost. Custom power ignored when less than or equal to zero.- Returns:
- custom power to be lost as a Double.
-
setCustomPowerLost
public void setCustomPowerLost(java.lang.Double loss)
Sets the variable power lost. Custom power ignored when less than or equal to zero.- Parameters:
loss- Double amount for the custom power loss to be set to.
-
usingCustomPower
public boolean usingCustomPower()
Determines if custom power is to be used.- Returns:
- If custom power is to be used as a boolean.
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean c)
- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
-