aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/events/GuiContainerEvent.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/events/GuiContainerEvent.kt')
-rw-r--r--src/main/kotlin/com/ambientaddons/events/GuiContainerEvent.kt17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/kotlin/com/ambientaddons/events/GuiContainerEvent.kt b/src/main/kotlin/com/ambientaddons/events/GuiContainerEvent.kt
new file mode 100644
index 0000000..276abc3
--- /dev/null
+++ b/src/main/kotlin/com/ambientaddons/events/GuiContainerEvent.kt
@@ -0,0 +1,17 @@
+package com.ambientaddons.events
+
+import net.minecraft.client.gui.inventory.GuiContainer
+import net.minecraft.inventory.Container
+import net.minecraft.inventory.Slot
+import net.minecraftforge.fml.common.eventhandler.Cancelable
+import net.minecraftforge.fml.common.eventhandler.Event
+
+// credit Harry282/Skyblock-Client, under AGPL 3.0
+open class GuiContainerEvent(val container: Container, val gui: GuiContainer) : Event() {
+ @Cancelable
+ class DrawSlotEvent(container: Container, gui: GuiContainer, var slot: Slot) : GuiContainerEvent(container, gui)
+
+ @Cancelable
+ class SlotClickEvent(container: Container, gui: GuiContainer, var slot: Slot?, var slotId: Int) :
+ GuiContainerEvent(container, gui)
+} \ No newline at end of file