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.

### 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
--- | ---
`PowerLossEvent​(Faction f, FPlayer p)` |

### Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`double` | `getCustomPowerLost()` | Gets the variable power lost.
`double` | `getDefaultPowerLost()` | Gets the configured damage to a players individual power on death
`java.lang.String` | `getFactionId()` | Deprecated. use getFaction().getId() instead.
`java.lang.String` | `getFactionTag()` | Deprecated. use getFaction().getTag() instead.
`java.lang.String` | `getMessage()` | Get the power loss message.
`org.bukkit.entity.Player` | `getPlayer()` | Deprecated. use getfPlayer().getPlayer() instead.
`boolean` | `isCancelled()` |
`void` | `setCancelled​(boolean c)` |
`void` | `setCustomPowerLost​(java.lang.Double loss)` | Sets the variable power lost.
`void` | `setMessage​(java.lang.String message)` | Set the power loss message.
`boolean` | `usingCustomPower()` | 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`

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

#### PowerLossEvent

    public PowerLossEvent​(Faction f,
                          FPlayer p)

### 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:
  `isCancelled` in interface `org.bukkit.event.Cancellable`

#### setCancelled

    public void setCancelled​(boolean c)

Specified by:
  `setCancelled` in interface `org.bukkit.event.Cancellable`