summaryrefslogtreecommitdiffstats
path: root/nms-patches/Container.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-20 10:19:22 +1100
committermd_5 <git@md-5.net>2016-11-20 10:19:22 +1100
commit95436219a588cec7497112c879487ce5d5cec73a (patch)
treee1c37d68683631c67c464df5fc4e4f97a79676cd /nms-patches/Container.patch
parent221508dce3904cf52a65aaf1e58a2ac3a4089080 (diff)
downloadcraftbukkit-95436219a588cec7497112c879487ce5d5cec73a.tar
craftbukkit-95436219a588cec7497112c879487ce5d5cec73a.tar.gz
craftbukkit-95436219a588cec7497112c879487ce5d5cec73a.tar.lz
craftbukkit-95436219a588cec7497112c879487ce5d5cec73a.tar.xz
craftbukkit-95436219a588cec7497112c879487ce5d5cec73a.zip
SPIGOT-2806: Fix PlayerDropItemEvent for disconnected players
Diffstat (limited to 'nms-patches/Container.patch')
-rw-r--r--nms-patches/Container.patch15
1 files changed, 14 insertions, 1 deletions
diff --git a/nms-patches/Container.patch b/nms-patches/Container.patch
index 7e5e2ff8..748e8a75 100644
--- a/nms-patches/Container.patch
+++ b/nms-patches/Container.patch
@@ -97,7 +97,20 @@
}
this.d();
-@@ -258,6 +318,15 @@
+@@ -165,8 +225,11 @@
+ if (i == -999) {
+ if (!playerinventory.getCarried().isEmpty()) {
+ if (j == 0) {
+- entityhuman.drop(playerinventory.getCarried(), true);
++ // CraftBukkit start
++ ItemStack carried = playerinventory.getCarried();
+ playerinventory.setCarried(ItemStack.a);
++ entityhuman.drop(carried, true);
++ // CraftBukkit start
+ }
+
+ if (j == 1) {
+@@ -258,6 +321,15 @@
}
slot2.f();