Fix ancient style event call in PlayerDropItemEvent

This commit is contained in:
md_5 2018-07-30 19:29:03 +10:00
parent 3f9d7f7770
commit 8592585b9f

View File

@ -6,7 +6,7 @@
+// CraftBukkit start
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.craftbukkit.entity.CraftItem;
+import org.bukkit.entity.Item;
+import org.bukkit.entity.Player;
+import org.bukkit.event.entity.CreatureSpawnEvent;
+import org.bukkit.event.entity.EntityCombustByEntityEvent;
@ -93,7 +93,7 @@
+ // CraftBukkit start - fire PlayerDropItemEvent
+ Player player = (Player) this.getBukkitEntity();
+ CraftItem drop = new CraftItem(this.world.getServer(), entityitem);
+ Item drop = (Item) entityitem.getBukkitEntity();
+
+ PlayerDropItemEvent event = new PlayerDropItemEvent(player, drop);
+ this.world.getServer().getPluginManager().callEvent(event);