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
ConstructorDescriptionDisallowedPVPEvent
(org.bukkit.entity.Player attacker, org.bukkit.entity.Player defender, org.bukkit.event.Event event) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.Player
org.bukkit.event.Event
getCause()
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
-
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 interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceorg.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 classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-