• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Blaze类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IterableSubject类代码示例发布时间:2022-05-21
下一篇:
Java ClusterStats类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap