diff options
author | Bjarne Koll <[email protected]> | 2024-06-16 17:21:14 +0200 |
---|---|---|
committer | Bjarne Koll <[email protected]> | 2024-06-16 17:23:42 +0200 |
commit | e1c003355296d70ea50e80d1933aba34e00d0763 (patch) | |
tree | 728ab80298d566c824b32d0e4be332871faef9fb /patches/api/0458-Add-CartographyItemEvent.patch | |
parent | ec4c712efa6c8eaeb514156357da679e540bfeda (diff) | |
download | Paper-e1c003355296d70ea50e80d1933aba34e00d0763.tar.gz Paper-e1c003355296d70ea50e80d1933aba34e00d0763.zip |
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
2b4b6d14 PR-1023: Convert InventoryView to interface
CraftBukkit Changes:
68603b1c1 Use expanded interaction ranges for traced interact events
eae9f760c PR-1414: Convert InventoryView to interface
ee9eafe67 Fix Implementation for DamageSource#isIndirect for internal custom causing entity
Diffstat (limited to 'patches/api/0458-Add-CartographyItemEvent.patch')
-rw-r--r-- | patches/api/0458-Add-CartographyItemEvent.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/patches/api/0458-Add-CartographyItemEvent.patch b/patches/api/0458-Add-CartographyItemEvent.patch new file mode 100644 index 0000000000..1f19663c9f --- /dev/null +++ b/patches/api/0458-Add-CartographyItemEvent.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Janet Blackquill <[email protected]> +Date: Sun, 7 Apr 2024 16:51:04 -0400 +Subject: [PATCH] Add CartographyItemEvent + +Similar to SmithItemEvent, but for cartography tables. + +diff --git a/src/main/java/io/papermc/paper/event/player/CartographyItemEvent.java b/src/main/java/io/papermc/paper/event/player/CartographyItemEvent.java +new file mode 100644 +index 0000000000000000000000000000000000000000..659b620696e5cc0784ed707c70876e4348897c7f +--- /dev/null ++++ b/src/main/java/io/papermc/paper/event/player/CartographyItemEvent.java +@@ -0,0 +1,31 @@ ++package io.papermc.paper.event.player; ++ ++import org.bukkit.inventory.InventoryView; ++import org.bukkit.inventory.CartographyInventory; ++import org.bukkit.event.inventory.ClickType; ++import org.bukkit.event.inventory.InventoryType; ++import org.bukkit.event.inventory.InventoryAction; ++import org.bukkit.event.inventory.InventoryClickEvent; ++import org.jetbrains.annotations.NotNull; ++import org.jetbrains.annotations.ApiStatus; ++ ++/** ++ * Called when the recipe of an Item is completed inside a cartography table. ++ */ ++public class CartographyItemEvent extends InventoryClickEvent { ++ @ApiStatus.Internal ++ public CartographyItemEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action) { ++ super(view, type, slot, click, action); ++ } ++ ++ @ApiStatus.Internal ++ public CartographyItemEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action, int key) { ++ super(view, type, slot, click, action, key); ++ } ++ ++ @NotNull ++ @Override ++ public CartographyInventory getInventory() { ++ return (CartographyInventory) super.getInventory(); ++ } ++} |