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 SummaryNested ClassesNested classes/interfaces inherited from class org.bukkit.event.Eventorg.bukkit.event.Event.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerBanItemEvent(@NotNull org.bukkit.entity.Player player, @NotNull PlayerBanItemEvent.Type type, @NotNull BannedItem bannedItem, @NotNull BanAction action, @NotNull BanActionData actionData, @Nullable BanData... data) Construct the event with all information about the occurring banning process.
- 
Method SummaryModifier and TypeMethodDescription@NotNull BanActionThe ban action.@NotNull BanActionDataThe ban action data.@NotNull BannedItemThe banned item.@Nullable BanData[]getData()The data used.static @NotNull org.bukkit.event.HandlerListBukkit event handler list.@NotNull org.bukkit.event.HandlerListInternal Bukkit event handler list.@NotNull PlayerBanItemEvent.TypegetType()Type of banning.booleanCheck if the event is cancelled.voidsetCancelled(boolean cancel) Cancel the event.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
PlayerBanItemEventpublic PlayerBanItemEvent(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull PlayerBanItemEvent.Type type, @NotNull @NotNull BannedItem bannedItem, @NotNull @NotNull BanAction action, @NotNull @NotNull BanActionData actionData, @Nullable @Nullable BanData... data) Construct the event with all information about the occurring banning process.- Parameters:
- player- the involved player
- type- the- PlayerBanItemEvent.Typeof ban
- bannedItem- the item involved
- action- the action triggered
- actionData- the complete data configured for the action
- data- optional additional data about the action triggered
 
 
- 
- 
Method Details- 
getTypeType of banning.- Returns:
- the type of ban, BLACKLIST or WHITELIST
 
- 
getBannedItemThe banned item.- Returns:
- the banned item involved into this event
 
- 
getActionThe ban action.- Returns:
- the action triggered
 
- 
getActionDataThe ban action data.- Returns:
- the ban action data that the banned item has in database
 
- 
getDataThe data used.- Returns:
- all the ban datas used into this event
 
- 
isCancelledpublic boolean isCancelled()Check if the event is cancelled.- Specified by:
- isCancelledin interface- org.bukkit.event.Cancellable
- Returns:
- true if the event is cancelled, otherwise false
 
- 
setCancelledpublic void setCancelled(boolean cancel) Cancel the event.- Specified by:
- setCancelledin interface- org.bukkit.event.Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Internal Bukkit event handler list.- Specified by:
- getHandlersin class- org.bukkit.event.Event
- Returns:
- internal bukkit event handler list
 
- 
getHandlerList@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()Bukkit event handler list.- Returns:
- the bukkit event handler list
 
 
-