Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Also, restore a patch that was dropped in the last upstream Bukkit Changes: 279eeab3 Fix command description not being set 96e2bb18 Remove debug print from SyntheticEventTest CraftBukkit Changes: d3ed1516 Fix dangerously threaded beacons 217a293d Don't relocate joptsimple to allow --help to work. 1be05a21 Prepare for imminent Java 12 release a49270b2 Mappings Update 5259d80c SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports Spigot Changes: e6eb36f2 Rebuild patches
This commit is contained in:
parent
0976d52bbd
commit
ea855e2b46
332 changed files with 1073 additions and 843 deletions
|
@ -1,48 +0,0 @@
|
|||
From fa6299812f51c7522de971796540aab08c18866a Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 28 Aug 2018 23:04:06 -0400
|
||||
Subject: [PATCH] Inventory#removeItemAnySlot
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/Inventory.java b/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
index 36e352917..a358e9014 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/Inventory.java
|
||||
@@ -138,6 +138,34 @@ public interface Inventory extends Iterable<ItemStack> {
|
||||
@NotNull
|
||||
public HashMap<Integer, ItemStack> removeItem(@NotNull ItemStack... items) throws IllegalArgumentException;
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Searches all possible inventory slots in order to remove the given ItemStacks.
|
||||
+ * <p>
|
||||
+ * Similar to {@link Inventory#removeItem(ItemStack...)} in behavior, except this
|
||||
+ * method will check all possible slots in the inventory, rather than just the main
|
||||
+ * storage contents.
|
||||
+ * <p>
|
||||
+ * It will try to remove 'as much as possible' from the types and amounts
|
||||
+ * you give as arguments.
|
||||
+ * <p>
|
||||
+ * The returned HashMap contains what it couldn't remove, where the key is
|
||||
+ * the index of the parameter, and the value is the ItemStack at that
|
||||
+ * index of the varargs parameter. If all the given ItemStacks are
|
||||
+ * removed, it will return an empty HashMap.
|
||||
+ * <p>
|
||||
+ * It is known that in some implementations this method will also set the
|
||||
+ * inputted argument amount to the number of that item not removed from
|
||||
+ * slots.
|
||||
+ *
|
||||
+ * @param items The ItemStacks to remove
|
||||
+ * @return A HashMap containing items that couldn't be removed.
|
||||
+ * @throws IllegalArgumentException if items is null
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public HashMap<Integer, ItemStack> removeItemAnySlot(@NotNull ItemStack... items) throws IllegalArgumentException;
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Returns all ItemStacks from the inventory
|
||||
*
|
||||
--
|
||||
2.21.0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue