Contents
Class DropItemEvent.Drop
java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.component.system.CancellableEcsEvent
com.hypixel.hytale.server.core.event.events.ecs.DropItemEvent
com.hypixel.hytale.server.core.event.events.ecs.DropItemEvent.Drop
- All Implemented Interfaces:
ICancellableEcsEvent
- Enclosing class:
DropItemEvent
An event that is called when an entity is dropping an item from their inventory.
If cancelled, the item will not be dropped.
-
Nested Class Summary
Nested classes/interfaces inherited from class DropItemEvent
DropItemEvent.Drop, DropItemEvent.PlayerRequest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatvoidsetItemStack(ItemStack itemStack) Called to set the item stack being dropped.voidsetThrowSpeed(float throwSpeed) Called to set the speed at which to throw the item.Methods inherited from class CancellableEcsEvent
isCancelled, setCancelled
-
Constructor Details
-
Drop
Default Constructor for aDropItemEventinstance.- Parameters:
itemStack- The item stack being dropped.throwSpeed- The speed at which to throw the item.
-
-
Method Details
-
setThrowSpeed
public void setThrowSpeed(float throwSpeed) Called to set the speed at which to throw the item.- Parameters:
throwSpeed- the speed at which to throw the item.
-
getThrowSpeed
public float getThrowSpeed()- Returns:
- the speed at which to throw the item.
-
setItemStack
Called to set the item stack being dropped.- Parameters:
itemStack- the item stack being dropped.
-
getItemStack
- Returns:
- the item stack being dropped.
-