Package me.taylorkelly.bigbrother.datablock.explosions

Source Code of me.taylorkelly.bigbrother.datablock.explosions.CreeperExplosion

package me.taylorkelly.bigbrother.datablock.explosions;

import java.util.List;

import me.taylorkelly.bigbrother.BBPlayerInfo;
import me.taylorkelly.bigbrother.datablock.BBDataBlock;

import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;

public class CreeperExplosion extends Explosion {

    public CreeperExplosion(String player, Block block, String world) {
        super(Action.CREEPER_EXPLOSION, player, block, world);
    }

    public CreeperExplosion(Block block, String world) {
        super(Action.CREEPER_EXPLOSION, ENVIRONMENT, block, world);
    }

    protected Explosion newInstance(String player, Block block) {
        return new CreeperExplosion(player, block, block.getWorld().getName());
    }

    public static void create(Location location, List<Block> blockList, String world) {
        for (Block block : blockList) {
            BBDataBlock dataBlock = new CreeperExplosion(ENVIRONMENT, block, world);
            dataBlock.send();
            if (block.getType() == Material.TNT) {
                TNTLogger.log(ENVIRONMENT, block);
            }
        }
    }

    private CreeperExplosion(BBPlayerInfo player, String world, int x, int y, int z, int type, String data) {
        super(player, Action.CREEPER_EXPLOSION, world, x, y, z, type, data);
    }

    public static BBDataBlock getBBDataBlock(BBPlayerInfo player, String world, int x, int y, int z, int type, String data) {
        return new CreeperExplosion(player, world, x, y, z, type, data);
    }
}
TOP

Related Classes of me.taylorkelly.bigbrother.datablock.explosions.CreeperExplosion

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.