Class CoolerFeedPlayerEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.github.thebusybiscuit.slimefun4.api.events.CoolerFeedPlayerEvent
- All Implemented Interfaces:
Cancellable
- Author:
- TheBusyBiscuit
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionCoolerFeedPlayerEvent
(Player player, Cooler cooler, ItemStack coolerItem, ItemStack consumedItem) -
Method Summary
Modifier and TypeMethodDescriptionThis returns theItemStack
that was consumed.This returns theCooler
that was used.static HandlerList
boolean
void
setCancelled
(boolean cancel) void
setConsumedItem
(ItemStack item) This sets theItemStack
that should be "consumed".Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
CoolerFeedPlayerEvent
-
-
Method Details
-
getCooler
This returns theCooler
that was used.- Returns:
- The
Cooler
that was used
-
getCoolerItem
- Returns:
- The
Cooler
that was used
-
getConsumedItem
- Returns:
- The
ItemStack
that was consumed
-
setConsumedItem
This sets theItemStack
that should be "consumed". TheItemStack
must be a potion. ThePlayer
will receive thePotionEffects
of the provided potion upon consumption.- Parameters:
item
- The newItemStack
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceCancellable
-
getHandlerList
-
getHandlers
- Specified by:
getHandlers
in classEvent
-