mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
[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:
parent
67f275fc78
commit
4f37e35665
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue