Package redempt.redlib.enchants.events
Class PlayerChangedHeldItemEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
redempt.redlib.enchants.events.PlayerChangedHeldItemEvent
public class PlayerChangedHeldItemEvent
extends org.bukkit.event.player.PlayerEvent
Called when a player changes the item they are holding, or a property of their held item changes
-
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
ConstructorDescriptionPlayerChangedHeldItemEvent
(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack oldItem, org.bukkit.inventory.ItemStack newItem) Constructs a new PlayerChangedHeldItemEvent -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.inventory.ItemStack
org.bukkit.inventory.ItemStack
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerChangedHeldItemEvent
public PlayerChangedHeldItemEvent(org.bukkit.entity.Player player, org.bukkit.inventory.ItemStack oldItem, org.bukkit.inventory.ItemStack newItem) Constructs a new PlayerChangedHeldItemEvent- Parameters:
player
- The Player who changed their held itemoldItem
- The item they were previously holdingnewItem
- The item they are now holding
-
-
Method Details
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
getPreviousItem
public org.bukkit.inventory.ItemStack getPreviousItem()- Returns:
- The item the player was holding previously
-
getNewItem
public org.bukkit.inventory.ItemStack getNewItem()- Returns:
- The item the player is now holding
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
- Returns:
- The player
-