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


Java CreatureType类代码示例

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


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

示例1: evaluate

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Override
public FilterState evaluate(Object... objects) {
    for (Object object : objects) {
        if (object instanceof CreatureType) {
            if (object.equals(mobType))
                return ALLOW;
            else
                return DENY;
        }
    }
    return (getParent() == null ? ABSTAIN : getParent().evaluate(objects));
}
 
开发者ID:dentmaged,项目名称:Cardinal-Plus,代码行数:13,代码来源:MobFilter.java

示例2: enable

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
public void enable() {
//		plugin.getServer().getPluginManager().registerEvents(this, plugin);
		mobs.add(CreatureType.PIG);
		mobs.add(CreatureType.SHEEP);
		mobs.add(CreatureType.COW);
		mobs.add(CreatureType.CHICKEN);
		mobs.add(CreatureType.ZOMBIE);
		mobs.add(CreatureType.SKELETON);
		mobs.add(CreatureType.SPIDER);
		mobs.add(CreatureType.CAVE_SPIDER);
		mobs.add(CreatureType.PIG_ZOMBIE);
		log("Enabled");
	}
 
开发者ID:Esaych,项目名称:DDCustomPlugin,代码行数:14,代码来源:SpawnerSwitch.java

示例3: getInt

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
private int getInt(CreatureType c) {
	for (int i = 0; i < mobs.size(); i++) {
		if (mobs.get(i) == c)
			return i;
	}
	return 0;
}
 
开发者ID:Esaych,项目名称:DDCustomPlugin,代码行数:8,代码来源:SpawnerSwitch.java

示例4: onCreatureSpawnEvent

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
public void onCreatureSpawnEvent(CreatureSpawnEvent event)
{
    Entity mob = event.getEntity();
    if (mob instanceof Monster)
    {
        CreatureType type = event.getCreatureType();
        pg.mb.alter(mob, type);
    }
    if (mob.getType().equals(EntityType.IRON_GOLEM))
    {

    }
}
 
开发者ID:tritania,项目名称:Pugna,代码行数:15,代码来源:EntityListener.java

示例5: alter

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
public boolean alter(Entity mob, CreatureType type)
{
    if (pg.config.diffmob != true)
        return true;
    if (type == null)
        return true;

    Damageable mob2 = (Damageable) mob;

    mob2.setMaxHealth(150);
    mob2.setHealth(150);
    return true;
}
 
开发者ID:tritania,项目名称:Pugna,代码行数:14,代码来源:MobLevel.java

示例6: spawnCreature

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public LivingEntity spawnCreature(Location loc, CreatureType creatureType) {
    return spawnCreature(loc, creatureType.toEntityType());
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:5,代码来源:CraftWorld.java

示例7: getCreatureType

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public CreatureType getCreatureType() {
    return CreatureType.fromName(spawner.func_145881_a().getEntityNameToSpawn());
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:5,代码来源:CraftCreatureSpawner.java

示例8: setCreatureType

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public void setCreatureType(CreatureType creatureType) {
    spawner.func_145881_a().setEntityName(creatureType.getName());
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:5,代码来源:CraftCreatureSpawner.java

示例9: CreatureSpawnEvent

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public CreatureSpawnEvent(Entity spawnee, CreatureType type, Location loc, SpawnReason reason) {
    super(spawnee);
    spawnReason = reason;
}
 
开发者ID:CyberdyneCC,项目名称:Thermos-Bukkit,代码行数:6,代码来源:CreatureSpawnEvent.java

示例10: PlayerEggThrowEvent

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public PlayerEggThrowEvent(Player player, Egg egg, boolean hatching, byte numHatches, CreatureType hatchingType) {
    this(player, egg, hatching, numHatches, hatchingType.toEntityType());
}
 
开发者ID:CyberdyneCC,项目名称:Thermos-Bukkit,代码行数:5,代码来源:PlayerEggThrowEvent.java

示例11: MobFilterParser

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
public MobFilterParser(final Element element) {
    super(element);
    this.mobType = CreatureType.valueOf(element.getText().toUpperCase().replace(" ", "_"));
}
 
开发者ID:dentmaged,项目名称:Cardinal-Plus,代码行数:5,代码来源:MobFilterParser.java

示例12: getMobType

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
public CreatureType getMobType() {
    return mobType;
}
 
开发者ID:dentmaged,项目名称:Cardinal-Plus,代码行数:4,代码来源:MobFilterParser.java

示例13: spawnCreature

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public LivingEntity spawnCreature(Location loc, CreatureType type) {
    throw new NotImplementedException("spawnCreature(Location, CreatureType)");
}
 
开发者ID:CanaryBukkitTeam,项目名称:CanaryBukkit,代码行数:5,代码来源:CanaryWorld.java

示例14: getCreatureType

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public CreatureType getCreatureType() {
    return CreatureType.fromName(spawner.getSpawner().getMobName());
}
 
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:5,代码来源:CraftCreatureSpawner.java

示例15: setCreatureType

import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public void setCreatureType(CreatureType creatureType) {
    spawner.getSpawner().setMobName(creatureType.getName());
}
 
开发者ID:OvercastNetwork,项目名称:CraftBukkit,代码行数:5,代码来源:CraftCreatureSpawner.java


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