Java 类org.bukkit.event.block.BlockIgniteEvent.IgniteCause 实例源码

项目:Uranium    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Uranium    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:UltimateSpawn    文件:BasicFeatures.java   
@EventHandler
public void FireSpread(BlockIgniteEvent e) {
    if (ConfigGServerEvent.getConfig().getBoolean("Server.Disable.BlockIgnite-FireSpread.Enable")) {
        if (!ConfigGServerEvent.getConfig().getBoolean("Server.Disable.BlockIgnite-FireSpread.World.All_World")) {
            if (WorldUtils.getWFS().contains(e.getBlock().getWorld().getName())) {
                if (e.getCause() == IgniteCause.SPREAD) {
                    e.setCancelled(true);
                }
            }
        } else {
            if (e.getCause() == IgniteCause.SPREAD) {
    e.setCancelled(true);
}
        }
    }
}
项目:ThermosRebased    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:ThermosRebased    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Thermos    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Thermos    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:KCauldron    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:KCauldron    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:CauldronGit    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:CauldronGit    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Cauldron-Old    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Cauldron-Old    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Cauldron-Reloaded    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Cauldron-Reloaded    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:FFoKC    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:FFoKC    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:CraftBukkit    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:CraftBukkit    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Craftbukkit    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Craftbukkit    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Almura-Server    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Almura-Server    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Tweakkit-Server    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Tweakkit-Server    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Cauldron    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Cauldron    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.entity.Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:SpigotSource    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:SpigotSource    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Craft-city    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, int igniterX, int igniterY, int igniterZ) {
    org.bukkit.World bukkitWorld = world.getWorld();
    Block igniter = bukkitWorld.getBlockAt(igniterX, igniterY, igniterZ);
    IgniteCause cause;
    switch (igniter.getType()) {
        case LAVA:
        case STATIONARY_LAVA:
            cause = IgniteCause.LAVA;
            break;
        case DISPENSER:
            cause = IgniteCause.FLINT_AND_STEEL;
            break;
        case FIRE: // Fire or any other unknown block counts as SPREAD.
        default:
            cause = IgniteCause.SPREAD;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Craft-city    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(World world, int x, int y, int z, Entity igniter) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
    IgniteCause cause;
    switch (bukkitIgniter.getType()) {
    case ENDER_CRYSTAL:
        cause = IgniteCause.ENDER_CRYSTAL;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SMALL_FIREBALL:
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL;
    }

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), cause, bukkitIgniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Uranium    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.world.Explosion explosion) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity igniter = explosion.exploder == null ? null : explosion.exploder.getBukkitEntity();

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), IgniteCause.EXPLOSION, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:EscapeLag    文件:FireLimitor.java   
@EventHandler
public void WhenFireLimitor(BlockIgniteEvent event) {
    if (ConfigOptimize.FireLimitorenable == true) {
        if (event.getCause() == IgniteCause.FLINT_AND_STEEL) {
            return;
        }
        Block block = event.getBlock();
        if (CheckFast(block.getChunk())) {
            event.setCancelled(true);
        } else {
            ChunkChecked.put(block.getChunk(), System.currentTimeMillis());
        }
    }
}
项目:SurvivalPlus    文件:FirestrikerClick.java   
@SuppressWarnings("deprecation")
public boolean ignite(Player igniter, Location loc, IgniteCause cause) {
    Random rand = new Random();

    loc.add(0.5, 0.5, 0.5);

    BlockIgniteEvent igniteEvent = new BlockIgniteEvent(loc.getBlock(), 
            cause, (org.bukkit.entity.Entity) igniter);
    Bukkit.getServer().getPluginManager().callEvent(igniteEvent);
    if (igniteEvent.isCancelled()) {
        return false;
    }

    BlockState blockState = loc.getBlock().getState();

    BlockPlaceEvent placeEvent = new BlockPlaceEvent(loc.getBlock(), 
            blockState, loc.getBlock(), igniter.getItemInHand(), igniter, true);
    Bukkit.getServer().getPluginManager().callEvent(placeEvent);

    if (placeEvent.isCancelled() || !placeEvent.canBuild()) {
        placeEvent.getBlockPlaced().setTypeIdAndData(0, (byte) 0, false);
        return false;
    }

    loc.getWorld().playSound(loc, Sound.ITEM_FLINTANDSTEEL_USE, 1.0F, rand.nextFloat() * 0.4F + 0.8F);
    loc.getBlock().setType(Material.FIRE);

    return true;
}
项目:ThermosRebased    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.world.Explosion explosion) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity igniter = explosion.exploder == null ? null : explosion.exploder.getBukkitEntity();

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), IgniteCause.EXPLOSION, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:Breakpoint    文件:PlayerInteractListener.java   
@EventHandler
public void onBlockIgnite(BlockIgniteEvent event)
{
    IgniteCause ic = event.getCause();
    if(ic != IgniteCause.FLINT_AND_STEEL)
        event.setCancelled(true);
}
项目:ExilePearl    文件:ExileListener.java   
/**
 * Prevents exiled players from breaking blocks
 * @param e The event
 */
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onPlayerIgnite(BlockIgniteEvent e) {
    if (e.getCause() == IgniteCause.FLINT_AND_STEEL) {
        checkAndCancelRule(ExileRule.IGNITE, e, e.getPlayer());
    }
}
项目:Pokkit    文件:PlayerBlockEvents.java   
@EventHandler(ignoreCancelled = false)
public void onBlockIgnite(cn.nukkit.event.block.BlockIgniteEvent event) {
    if (canIgnore(BlockIgniteEvent.getHandlerList())) {
        return;
    }

    cn.nukkit.block.Block ignited = event.getBlock();
    IgniteCause cause = IgniteCause.FLINT_AND_STEEL;

    switch (event.getCause()) {
    case EXPLOSION:
        cause = IgniteCause.EXPLOSION;
        break;
    case FIREBALL:
        cause = IgniteCause.FIREBALL;
        break;
    case FLINT_AND_STEEL:
        cause = IgniteCause.FLINT_AND_STEEL;
        break;
    case LAVA:
        cause = IgniteCause.LAVA;
        break;
    case LIGHTNING:
        cause = IgniteCause.LIGHTNING;
        break;
    case SPREAD:
        cause = IgniteCause.SPREAD;
        break;
    default:
        cause = IgniteCause.FLINT_AND_STEEL; // Default to Flint and Steel
        break;
    }

    BlockIgniteEvent bukkitEvent = new BlockIgniteEvent(PokkitBlock.toBukkit(ignited), cause, PokkitEntity.toBukkit(event.getEntity()));
    callCancellable(event, bukkitEvent);
}
项目:Thermos    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.world.Explosion explosion) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity igniter = explosion.exploder == null ? null : explosion.exploder.getBukkitEntity();

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), IgniteCause.EXPLOSION, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}
项目:KCauldron    文件:CraftEventFactory.java   
public static BlockIgniteEvent callBlockIgniteEvent(net.minecraft.world.World world, int x, int y, int z, net.minecraft.world.Explosion explosion) {
    org.bukkit.World bukkitWorld = world.getWorld();
    org.bukkit.entity.Entity igniter = explosion.exploder == null ? null : explosion.exploder.getBukkitEntity();

    BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(x, y, z), IgniteCause.EXPLOSION, igniter);
    world.getServer().getPluginManager().callEvent(event);
    return event;
}