当前位置: 首页>>代码示例>>Java>>正文


Java Blaze类代码示例

本文整理汇总了Java中org.bukkit.entity.Blaze的典型用法代码示例。如果您正苦于以下问题:Java Blaze类的具体用法?Java Blaze怎么用?Java Blaze使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Blaze类属于org.bukkit.entity包,在下文中一共展示了Blaze类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBukkitEntity

import org.bukkit.entity.Blaze; //导入依赖的package包/类
@Override
public Blaze getBukkitEntity() {
    return (Blaze) super.getBukkitEntity();
}
 
开发者ID:TechzoneMC,项目名称:SonarPet,代码行数:5,代码来源:EntityBlazePet.java

示例2: CanaryBlaze

import org.bukkit.entity.Blaze; //导入依赖的package包/类
public CanaryBlaze(net.canarymod.api.entity.living.monster.Blaze entity) {
    super(entity);
}
 
开发者ID:CanaryBukkitTeam,项目名称:CanaryBukkit,代码行数:4,代码来源:CanaryBlaze.java

示例3: spawnBlaze

import org.bukkit.entity.Blaze; //导入依赖的package包/类
public Blaze spawnBlaze(Location location) {
    return (Blaze) location.getWorld().spawnEntity(location, EntityType.BLAZE);
}
 
开发者ID:rlf,项目名称:uSkyBlock,代码行数:4,代码来源:EntitySpawner.java

示例4: teleportCheck

import org.bukkit.entity.Blaze; //导入依赖的package包/类
/** 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;

}
 
开发者ID:C4K3,项目名称:PvPTeleport,代码行数:63,代码来源:WorldCommand.java

示例5: RemoteBlaze

import org.bukkit.entity.Blaze; //导入依赖的package包/类
public RemoteBlaze(int inID, RemoteBlazeEntity inEntity, EntityManager inManager)
{
	super(inID, RemoteEntityType.Blaze, inManager);
	this.m_entity = inEntity;
}
 
开发者ID:MeRPG2,项目名称:EndHQ-Libraries,代码行数:6,代码来源:RemoteBlaze.java


注:本文中的org.bukkit.entity.Blaze类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。