Java 类org.bukkit.entity.Blaze 实例源码

项目:SonarPet    文件:EntityBlazePet.java   
@Override
public Blaze getBukkitEntity() {
    return (Blaze) super.getBukkitEntity();
}
项目:CanaryBukkit    文件:CanaryBlaze.java   
public CanaryBlaze(net.canarymod.api.entity.living.monster.Blaze entity) {
    super(entity);
}
项目:uSkyBlock    文件:EntitySpawner.java   
public Blaze spawnBlaze(Location location) {
    return (Blaze) location.getWorld().spawnEntity(location, EntityType.BLAZE);
}
项目:PvPTeleport    文件:WorldCommand.java   
/** Checks that player is not trying to combatlog/is allowed to teleport
 * Returns an error message to be displayed if the player is not allowed
 * to teleport
 * Returns null if the player is allowed to teleport
 */
private static String teleportCheck(Player player) {

    Location pLoc = player.getLocation();

    World world = player.getWorld();

    /* Check if there are any players within 50 blocks */
    for (Player p : world.getPlayers()) {

        if (!p.equals(player)
                && p.getLocation().distance(pLoc) < 50
                && player.canSee(p)
                && !p.isDead()) {
            return ChatColor.RED + "You cannot use this command while within 50 blocks of any other players.";
        }

    }

    /* Check if there are any hostile mobs within 5 blocks */
    for (Entity entity : world.getEntitiesByClasses(
                Blaze.class,
                CaveSpider.class,
                Creeper.class,
                Enderman.class,
                Ghast.class,
                MagmaCube.class,
                PigZombie.class,
                Skeleton.class,
                Silverfish.class,
                Slime.class,
                Spider.class,
                Witch.class,
                Zombie.class)) {

        if (entity.getLocation().distance(pLoc) < 5) {
            return ChatColor.RED + "You cannot use this command while within 5 blocks of any hostile mobs.";
        }

    }

    /* Check if the player is falling */
    if (player.getVelocity().getY() < -0.079
            || player.getVelocity().getY() > 0.08) {
        return ChatColor.RED + "You cannot use this command while falling.";
    }

    /* Check if the player is burning */
    if (player.getFireTicks() > 0
            && !player.hasPotionEffect(
                PotionEffectType.FIRE_RESISTANCE)) {
        return ChatColor.RED + "You cannot use this command while on fire.";
    }

    /* Default to allow teleport */
    return null;

}
项目:EndHQ-Libraries    文件:RemoteBlaze.java   
public RemoteBlaze(int inID, RemoteBlazeEntity inEntity, EntityManager inManager)
{
    super(inID, RemoteEntityType.Blaze, inManager);
    this.m_entity = inEntity;
}