mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 13:06:02 +01:00
Check the value returned from useItemInHand() so plugins can properly cancel it - SPIGOT-764
This commit is contained in:
parent
529e4cd74a
commit
961287a4cc
@ -1,5 +1,5 @@
|
|||||||
--- /home/matt/mc-dev-private//net/minecraft/server/PlayerInteractManager.java 2015-02-26 22:40:23.011608135 +0000
|
--- ../work/decompile-b7d1577c//net/minecraft/server/PlayerInteractManager.java 2015-05-23 09:43:31.941237938 -0500
|
||||||
+++ src/main/java/net/minecraft/server/PlayerInteractManager.java 2015-02-26 22:40:23.011608135 +0000
|
+++ src/main/java/net/minecraft/server/PlayerInteractManager.java 2015-05-23 09:43:31.949238036 -0500
|
||||||
@@ -1,5 +1,13 @@
|
@@ -1,5 +1,13 @@
|
||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
@ -269,7 +269,7 @@
|
|||||||
+ result = blockdata.getBlock().interact(world, blockposition, blockdata, entityhuman, enumdirection, f, f1, f2);
|
+ result = blockdata.getBlock().interact(world, blockposition, blockdata, entityhuman, enumdirection, f, f1, f2);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (itemstack != null && !result) {
|
+ if (itemstack != null && !result && !interactResult) { // add !interactResult SPIGOT-764
|
||||||
+ int j1 = itemstack.getData();
|
+ int j1 = itemstack.getData();
|
||||||
+ int k1 = itemstack.count;
|
+ int k1 = itemstack.count;
|
||||||
+
|
+
|
||||||
|
Loading…
Reference in New Issue
Block a user