Package fr.andross.banitem.events
Class PlayerBanItemEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
fr.andross.banitem.events.PlayerBanItemEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public final class PlayerBanItemEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Called when an item should be banned
This is only for check purpose, no modifications can be made.
Cancelling the event will cancel the ban process.
- Version:
- 3.3
- Author:
- Andross
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerBanItemEvent
(org.bukkit.entity.Player player, PlayerBanItemEvent.Type type, BannedItem bannedItem, BanAction action, BanActionData actionData, BanData... data) -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Error in typo.The ban actionDeprecated.Error in typo.The ban action dataThe banned itemBanData[]
getData()
The data usedstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
getType()
Type of banningboolean
void
setCancelled
(boolean cancel) Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerBanItemEvent
public PlayerBanItemEvent(@NotNull org.bukkit.entity.Player player, @NotNull PlayerBanItemEvent.Type type, @NotNull BannedItem bannedItem, @NotNull BanAction action, @NotNull BanActionData actionData, @Nullable BanData... data)
-
-
Method Details
-
getType
Type of banning- Returns:
- the type of ban, BLACKLIST or WHITELIST
-
getBannedItem
The banned item- Returns:
- the banned item involved into this event
-
getAction
The ban action- Returns:
- the action triggered
-
getActionData
The ban action data- Returns:
- the ban action data that the banned item has in database
-
getaction
Deprecated.Error in typo. UsegetAction()
instead.The ban action- Returns:
- the action triggered
-
getactionData
Deprecated.Error in typo. UsegetActionData()
instead.The ban action data- Returns:
- the ban action data that the banned item has in database
-
getData
The data used- Returns:
- all the ban datas used into this event
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
@NotNull public static org.bukkit.event.HandlerList getHandlerList()
-