mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 13:06:02 +01:00
More PLAYER_ITEM blockFace fixes of static fails; (1!=l) -- Thanks Scient for pointing it out
This commit is contained in:
parent
88dea6189a
commit
bb8d9fbe9d
@ -40,7 +40,7 @@ public class ItemHoe extends Item {
|
|||||||
Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
|
Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
|
||||||
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
|
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
|
||||||
org.bukkit.block.Block blockClicked = craftWorld.getBlockAt(i, j, k);
|
org.bukkit.block.Block blockClicked = craftWorld.getBlockAt(i, j, k);
|
||||||
BlockFace blockFace = CraftBlock.notchToBlockFace(1);
|
BlockFace blockFace = CraftBlock.notchToBlockFace(l);
|
||||||
|
|
||||||
PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockFace);
|
PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockFace);
|
||||||
craftServer.getPluginManager().callEvent(event);
|
craftServer.getPluginManager().callEvent(event);
|
||||||
|
@ -34,7 +34,7 @@ public class ItemMinecart extends Item {
|
|||||||
Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
|
Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
|
||||||
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
|
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
|
||||||
org.bukkit.block.Block blockClicked = craftWorld.getBlockAt(i, j, k);
|
org.bukkit.block.Block blockClicked = craftWorld.getBlockAt(i, j, k);
|
||||||
BlockFace blockFace = CraftBlock.notchToBlockFace(1);
|
BlockFace blockFace = CraftBlock.notchToBlockFace(l);
|
||||||
|
|
||||||
PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockFace);
|
PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockFace);
|
||||||
craftServer.getPluginManager().callEvent(event);
|
craftServer.getPluginManager().callEvent(event);
|
||||||
|
@ -56,7 +56,7 @@ public class ItemRedstone extends Item {
|
|||||||
Type eventType = Type.PLAYER_ITEM;
|
Type eventType = Type.PLAYER_ITEM;
|
||||||
Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
|
Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
|
||||||
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
|
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
|
||||||
BlockFace blockface = CraftBlock.notchToBlockFace(1);
|
BlockFace blockface = CraftBlock.notchToBlockFace(l);
|
||||||
|
|
||||||
PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockface);
|
PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockface);
|
||||||
craftServer.getPluginManager().callEvent(event);
|
craftServer.getPluginManager().callEvent(event);
|
||||||
|
@ -35,7 +35,7 @@ public class ItemSeeds extends Item {
|
|||||||
Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
|
Player who = (entityhuman == null) ? null : (Player) entityhuman.getBukkitEntity();
|
||||||
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
|
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
|
||||||
org.bukkit.block.Block blockClicked = craftWorld.getBlockAt(i, j, k);
|
org.bukkit.block.Block blockClicked = craftWorld.getBlockAt(i, j, k);
|
||||||
BlockFace blockface = CraftBlock.notchToBlockFace(1);
|
BlockFace blockface = CraftBlock.notchToBlockFace(l);
|
||||||
|
|
||||||
PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockface);
|
PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockface);
|
||||||
craftServer.getPluginManager().callEvent(event);
|
craftServer.getPluginManager().callEvent(event);
|
||||||
|
Loading…
Reference in New Issue
Block a user