use of org.bukkit.craftbukkit.v1_8_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_8_R3 method spawnGolem.
public void spawnGolem(Location location, Player player) {
net.minecraft.server.v1_8_R3.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
RidableIronGolem ironGolem = new RidableIronGolem(location.getWorld());
ironGolem.setPosition(location.getX(), location.getY(), location.getZ());
ironGolem.setCustomName(ChatManager.colorMessage("In-Game.Spawned-Golem-Name").replaceAll("%player%", player.getName()));
ironGolem.setCustomNameVisible(true);
McWorld.addEntity(ironGolem, CreatureSpawnEvent.SpawnReason.CUSTOM);
this.addIronGolem((org.bukkit.entity.IronGolem) ironGolem.getBukkitEntity());
CreatureUtils.applyMetadata(ironGolem.getBukkitEntity(), this);
}
use of org.bukkit.craftbukkit.v1_8_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_8_R3 method spawnFastZombie.
public void spawnFastZombie(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size() - 1));
net.minecraft.server.v1_8_R3.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
FastZombie fastZombie = new FastZombie(location.getWorld());
fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
Zombie zombie = (Zombie) fastZombie.getBukkitEntity();
zombie.setRemoveWhenFarAway(false);
CreatureUtils.applyHealthBar(zombie);
this.addZombie((Zombie) fastZombie.getBukkitEntity());
CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
super.subtractZombiesToSpawn();
}
use of org.bukkit.craftbukkit.v1_8_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_8_R3 method spawnGolemBuster.
public void spawnGolemBuster(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size() - 1));
net.minecraft.server.v1_8_R3.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
GolemBuster fastZombie = new GolemBuster(location.getWorld());
fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
Zombie zombie = (Zombie) fastZombie.getBukkitEntity();
zombie.getEquipment().setHelmet(new ItemStack(Material.TNT));
zombie.getEquipment().setHelmetDropChance(0.0F);
zombie.getEquipment().setItemInHandDropChance(0F);
zombie.setRemoveWhenFarAway(false);
CreatureUtils.applyHealthBar(zombie);
this.addZombie(zombie);
CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
super.subtractZombiesToSpawn();
}
use of org.bukkit.craftbukkit.v1_8_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_8_R3 method spawnBabyZombie.
public void spawnBabyZombie(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size() - 1));
net.minecraft.server.v1_8_R3.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
BabyZombie fastZombie = new BabyZombie(location.getWorld());
fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
Zombie zombie = (Zombie) fastZombie.getBukkitEntity();
CreatureUtils.applyHealthBar(zombie);
zombie.setRemoveWhenFarAway(false);
McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
this.addZombie((Zombie) fastZombie.getBukkitEntity());
CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
super.subtractZombiesToSpawn();
}
use of org.bukkit.craftbukkit.v1_8_R1.CraftWorld in project Village_Defense by Plajer.
the class ArenaInitializer1_8_R3 method spawnPlayerBuster.
public void spawnPlayerBuster(Random random) {
Location location = zombieSpawns.get(random.nextInt(zombieSpawns.size() - 1));
net.minecraft.server.v1_8_R3.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
PlayerBuster fastZombie = new PlayerBuster(location.getWorld());
fastZombie.setPosition(location.getX(), location.getY(), location.getZ());
McWorld.addEntity(fastZombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
Zombie zombie = (Zombie) fastZombie.getBukkitEntity();
zombie.getEquipment().setHelmet(new ItemStack(Material.TNT));
zombie.getEquipment().setHelmetDropChance(0.0F);
zombie.getEquipment().setItemInHandDropChance(0F);
zombie.getEquipment().setBoots(new ItemStack(Material.GOLD_BOOTS));
zombie.getEquipment().setLeggings(new ItemStack(Material.GOLD_LEGGINGS));
zombie.getEquipment().setChestplate(new ItemStack(Material.GOLD_CHESTPLATE));
CreatureUtils.applyHealthBar(zombie);
this.addZombie(zombie);
CreatureUtils.applyMetadata(fastZombie.getBukkitEntity(), this);
super.subtractZombiesToSpawn();
}
Aggregations