13
0
geforkt von Mirrors/Paper

Added ItemSpawnEvent. Thanks myers!

By: EvilSeph <evilseph@unaligned.org>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2011-06-11 02:00:05 -04:00
Ursprung 81ef43a0cc
Commit 889f8d765d

Datei anzeigen

@ -7,6 +7,7 @@ import net.minecraft.server.EntityCreeper;
import net.minecraft.server.EntityGhast; import net.minecraft.server.EntityGhast;
import net.minecraft.server.EntityGiantZombie; import net.minecraft.server.EntityGiantZombie;
import net.minecraft.server.EntityHuman; import net.minecraft.server.EntityHuman;
import net.minecraft.server.EntityItem;
import net.minecraft.server.EntityLiving; import net.minecraft.server.EntityLiving;
import net.minecraft.server.EntityMonster; import net.minecraft.server.EntityMonster;
import net.minecraft.server.EntityPig; import net.minecraft.server.EntityPig;
@ -40,6 +41,7 @@ import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.CreatureSpawnEvent; import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.entity.EntityTameEvent; import org.bukkit.event.entity.EntityTameEvent;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.player.PlayerBucketEmptyEvent; import org.bukkit.event.player.PlayerBucketEmptyEvent;
import org.bukkit.event.player.PlayerBucketFillEvent; import org.bukkit.event.player.PlayerBucketFillEvent;
import org.bukkit.event.player.PlayerEvent; import org.bukkit.event.player.PlayerEvent;
@ -243,4 +245,17 @@ public class CraftEventFactory {
craftServer.getPluginManager().callEvent(event); craftServer.getPluginManager().callEvent(event);
return event; return event;
} }
/**
* ItemSpawnEvent
*/
public static ItemSpawnEvent callItemSpawnEvent(EntityItem entityitem) {
org.bukkit.entity.Entity entity = entityitem.getBukkitEntity();
CraftServer craftServer = (CraftServer) entity.getServer();
ItemSpawnEvent event = new ItemSpawnEvent(entity, entity.getLocation());
craftServer.getPluginManager().callEvent(event);
return event;
}
} }