Class DisallowedPVPEvent

java.lang.Object
org.bukkit.event.Event
com.sk89q.worldguard.bukkit.protection.events.DisallowedPVPEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class DisallowedPVPEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
This event is fired when PVP is disallowed between players due to a "pvp deny" flag. Cancelling this event allows the PVP in spite of this.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    DisallowedPVPEvent(org.bukkit.entity.Player attacker, org.bukkit.entity.Player defender, org.bukkit.event.Event event)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bukkit.entity.Player
     
    org.bukkit.event.Event
     
    org.bukkit.entity.Player
     
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    boolean
     
    void
    setCancelled(boolean cancelled)
     

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DisallowedPVPEvent

      public DisallowedPVPEvent(org.bukkit.entity.Player attacker, org.bukkit.entity.Player defender, org.bukkit.event.Event event)
  • Method Details

    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getAttacker

      public org.bukkit.entity.Player getAttacker()
      Returns:
      the attacking player.
    • getDefender

      public org.bukkit.entity.Player getDefender()
      Returns:
      the defending player.
    • getCause

      public org.bukkit.event.Event getCause()
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()