Class 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
    • 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 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

      • 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