summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndaBlock <anda.block12345@outlook.de>2018-10-31 19:55:04 +1100
committermd_5 <git@md-5.net>2018-10-31 19:55:53 +1100
commit1057710a78ec00a5812b26ebd800f0b645edde34 (patch)
tree184687b0a28df046087323debe19a89f99238df2 /src
parentf3f2fe5795ecaf5a93d7355a66a6fb6030d527f0 (diff)
downloadcraftbukkit-1057710a78ec00a5812b26ebd800f0b645edde34.tar
craftbukkit-1057710a78ec00a5812b26ebd800f0b645edde34.tar.gz
craftbukkit-1057710a78ec00a5812b26ebd800f0b645edde34.tar.lz
craftbukkit-1057710a78ec00a5812b26ebd800f0b645edde34.tar.xz
craftbukkit-1057710a78ec00a5812b26ebd800f0b645edde34.zip
SPIGOT-4376: Add draft BlockDropItemEvent
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 79d6578e..4e69ccc7 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -157,6 +157,13 @@ public class CraftEventFactory {
return event;
}
+ public static BlockDropItemEvent callBlockDropItemEvent(Block block, BlockState state, EntityPlayer player, EntityItem item) {
+ BlockDropItemEvent event = new BlockDropItemEvent(block, state, player.getBukkitEntity(), (org.bukkit.entity.Item) item.getBukkitEntity());
+ Bukkit.getPluginManager().callEvent(event);
+
+ return event;
+ }
+
public static EntityPlaceEvent callEntityPlaceEvent(ItemActionContext itemactioncontext, Entity entity) {
Player who = (itemactioncontext.getEntity() == null) ? null : (Player) itemactioncontext.getEntity().getBukkitEntity();
org.bukkit.block.Block blockClicked = CraftBlock.at(itemactioncontext.getWorld(), itemactioncontext.getClickPosition());