SPIGOT-1608: Add a way to get the hand used in PlayerInteract*Events
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
+ // this.interact(world, blockposition);
|
||||
+ // super.stepOn(world, blockposition, entity);
|
||||
+ if (entity instanceof EntityHuman) {
|
||||
+ org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null);
|
||||
+ org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.interact(world, blockposition, entity); // add entity
|
||||
+ super.stepOn(world, blockposition, entity);
|
||||
|
||||
Reference in New Issue
Block a user