13
0
geforkt von Mirrors/Paper

Refactored some code from nms to ob for minimal diffs

By: Dinnerbone <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2011-08-29 16:09:13 +01:00
Ursprung 2d1f91b750
Commit 61bb91531b

Datei anzeigen

@ -37,17 +37,10 @@ import org.bukkit.entity.AnimalTamer;
import org.bukkit.entity.CreatureType;
import org.bukkit.entity.Player;
import org.bukkit.event.Event.Type;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.entity.CreatureSpawnEvent;
import org.bukkit.event.block.*;
import org.bukkit.event.entity.*;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.event.entity.EntityTameEvent;
import org.bukkit.event.entity.ItemSpawnEvent;
import org.bukkit.event.player.PlayerBucketEmptyEvent;
import org.bukkit.event.player.PlayerBucketFillEvent;
import org.bukkit.event.player.PlayerEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.*;
public class CraftEventFactory {
private static boolean canBuild(CraftWorld world, Player player, int x, int z) {
@ -260,4 +253,16 @@ public class CraftEventFactory {
craftServer.getPluginManager().callEvent(event);
return event;
}
/**
* BlockFadeEvent
*/
public static BlockFadeEvent callBlockFadeEvent(Block block, int type) {
BlockState state = block.getState();
state.setTypeId(type);
BlockFadeEvent event = new BlockFadeEvent(block, state);
Bukkit.getPluginManager().callEvent(event);
return event;
}
}