[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.

By: zml2008 <zach@zachsthings.com>
This commit is contained in:
CraftBukkit/Spigot 2012-03-10 21:56:55 -08:00
parent 67f275fc78
commit 4f37e35665

View file

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