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:
@@ -26,7 +26,7 @@
|
||||
+ org.bukkit.event.Cancellable cancellable;
|
||||
+
|
||||
+ if (object instanceof EntityHuman) {
|
||||
+ cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) object, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null);
|
||||
+ cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) object, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
|
||||
+ } else if (object instanceof Entity) {
|
||||
+ cancellable = new EntityInteractEvent(((Entity) object).getBukkitEntity(), block);
|
||||
+ manager.callEvent((EntityInteractEvent) cancellable);
|
||||
|
||||
Reference in New Issue
Block a user