Package konquest.api.event.player
Class KonquestPlayerCombatTagEvent
java.lang.Object
org.bukkit.event.Event
konquest.api.event.KonquestEvent
konquest.api.event.player.KonquestPlayerEvent
konquest.api.event.player.KonquestPlayerCombatTagEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class KonquestPlayerCombatTagEvent
extends KonquestPlayerEvent
implements org.bukkit.event.Cancellable
Called when a player is attacked by another player.
Attacking another player causes the victim to become combat tagged. A player that is combat tagged is restricted from using a list of commands from the Konquest configuration. Canceling this event will prevent the victim from becoming combat tagged.
- Author:
- Rumsfield
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionKonquestPlayerCombatTagEvent(KonquestAPI konquest, KonquestPlayer player, KonquestPlayer attacker, org.bukkit.Location location) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the attacking player.org.bukkit.LocationGets the location that the player was combat tagged at.booleanvoidsetCancelled(boolean val) Methods inherited from class konquest.api.event.player.KonquestPlayerEvent
getPlayerMethods inherited from class konquest.api.event.KonquestEvent
getHandlerList, getHandlers, getKonquestMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
KonquestPlayerCombatTagEvent
public KonquestPlayerCombatTagEvent(KonquestAPI konquest, KonquestPlayer player, KonquestPlayer attacker, org.bukkit.Location location) Default constructor- Parameters:
konquest- The API instanceplayer- The playerattacker- The attacking playerlocation- The location
-
-
Method Details
-
getAttacker
Gets the attacking player.- Returns:
- The attacker
-
getLocation
public org.bukkit.Location getLocation()Gets the location that the player was combat tagged at.- Returns:
- The location
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean val) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-