本文整理汇总了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));
}
示例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");
}
示例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;
}
示例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))
{
}
}
示例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;
}
示例6: spawnCreature
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public LivingEntity spawnCreature(Location loc, CreatureType creatureType) {
return spawnCreature(loc, creatureType.toEntityType());
}
示例7: getCreatureType
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public CreatureType getCreatureType() {
return CreatureType.fromName(spawner.func_145881_a().getEntityNameToSpawn());
}
示例8: setCreatureType
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public void setCreatureType(CreatureType creatureType) {
spawner.func_145881_a().setEntityName(creatureType.getName());
}
示例9: CreatureSpawnEvent
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public CreatureSpawnEvent(Entity spawnee, CreatureType type, Location loc, SpawnReason reason) {
super(spawnee);
spawnReason = reason;
}
示例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());
}
示例11: MobFilterParser
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
public MobFilterParser(final Element element) {
super(element);
this.mobType = CreatureType.valueOf(element.getText().toUpperCase().replace(" ", "_"));
}
示例12: getMobType
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
public CreatureType getMobType() {
return mobType;
}
示例13: spawnCreature
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public LivingEntity spawnCreature(Location loc, CreatureType type) {
throw new NotImplementedException("spawnCreature(Location, CreatureType)");
}
示例14: getCreatureType
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public CreatureType getCreatureType() {
return CreatureType.fromName(spawner.getSpawner().getMobName());
}
示例15: setCreatureType
import org.bukkit.entity.CreatureType; //导入依赖的package包/类
@Deprecated
public void setCreatureType(CreatureType creatureType) {
spawner.getSpawner().setMobName(creatureType.getName());
}