aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/events/UseItemEvent.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/events/UseItemEvent.kt')
-rw-r--r--src/main/kotlin/events/UseItemEvent.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/kotlin/events/UseItemEvent.kt b/src/main/kotlin/events/UseItemEvent.kt
new file mode 100644
index 0000000..e294bb1
--- /dev/null
+++ b/src/main/kotlin/events/UseItemEvent.kt
@@ -0,0 +1,11 @@
+package moe.nea.firmament.events
+
+import net.minecraft.entity.player.PlayerEntity
+import net.minecraft.item.ItemStack
+import net.minecraft.util.Hand
+import net.minecraft.world.World
+
+data class UseItemEvent(val playerEntity: PlayerEntity, val world: World, val hand: Hand) : FirmamentEvent.Cancellable() {
+ companion object : FirmamentEventBus<UseItemEvent>()
+ val item: ItemStack = playerEntity.getStackInHand(hand)
+}