[Bleeding] Call a LAVA BlockIgniteEvent in another place in BlockStationary. Fixes BUKKIT-970

Also adds CraftEventFactory.callEvent(Event), which returns the event called. Currently only used for n.m.s.BlockStationary's lava
BlockIgniteEvent calls.
This commit is contained in:
zml2008
2012-03-10 21:56:55 -08:00
committed by EvilSeph
parent 2a4167d8a5
commit 868eaf571c
2 changed files with 16 additions and 5 deletions

View File

@@ -47,6 +47,7 @@ import org.bukkit.entity.PigZombie;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.Event;
import org.bukkit.event.block.*;
import org.bukkit.event.entity.*;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@@ -72,6 +73,11 @@ public class CraftEventFactory {
return distanceFromSpawn > spawnSize;
}
public static <T extends Event> T callEvent(T event) {
Bukkit.getServer().getPluginManager().callEvent(event);
return event;
}
/**
* Block place methods
*/