Search in sources :

Example 1 with WorkingWolf

use of pl.plajer.villagedefense3.creatures.v1_11_R1.WorkingWolf in project Village_Defense by Plajer.

the class ArenaInitializer1_12_R1 method spawnWolf.

public void spawnWolf(Location location, Player player) {
    net.minecraft.server.v1_12_R1.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
    WorkingWolf wolf = new WorkingWolf(location.getWorld());
    wolf.setPosition(location.getX(), location.getY(), location.getZ());
    McWorld.addEntity(wolf, CreatureSpawnEvent.SpawnReason.CUSTOM);
    wolf.setCustomName(ChatManager.colorMessage("In-Game.Spawned-Wolf-Name").replaceAll("%player%", player.getName()));
    wolf.setCustomNameVisible(true);
    wolf.setInvisible(false);
    ((Wolf) wolf.getBukkitEntity()).setOwner(player);
    CreatureUtils.applyMetadata(wolf.getBukkitEntity(), this);
    this.addWolf((Wolf) wolf.getBukkitEntity());
}
Also used : WorkingWolf(pl.plajer.villagedefense3.creatures.v1_12_R1.WorkingWolf) WorkingWolf(pl.plajer.villagedefense3.creatures.v1_12_R1.WorkingWolf) Wolf(org.bukkit.entity.Wolf) CraftWorld(org.bukkit.craftbukkit.v1_12_R1.CraftWorld)

Example 2 with WorkingWolf

use of pl.plajer.villagedefense3.creatures.v1_11_R1.WorkingWolf in project Village_Defense by Plajer.

the class ArenaInitializer1_11_R1 method spawnWolf.

public void spawnWolf(Location location, Player player) {
    net.minecraft.server.v1_11_R1.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
    WorkingWolf wolf = new WorkingWolf(location.getWorld());
    wolf.setPosition(location.getX(), location.getY(), location.getZ());
    McWorld.addEntity(wolf, CreatureSpawnEvent.SpawnReason.CUSTOM);
    wolf.setCustomName(ChatManager.colorMessage("In-Game.Spawned-Wolf-Name").replaceAll("%player%", player.getName()));
    wolf.setCustomNameVisible(true);
    wolf.setInvisible(false);
    ((Wolf) wolf.getBukkitEntity()).setOwner(player);
    CreatureUtils.applyMetadata(wolf.getBukkitEntity(), this);
    this.addWolf((Wolf) wolf.getBukkitEntity());
}
Also used : WorkingWolf(pl.plajer.villagedefense3.creatures.v1_11_R1.WorkingWolf) WorkingWolf(pl.plajer.villagedefense3.creatures.v1_11_R1.WorkingWolf) Wolf(org.bukkit.entity.Wolf) CraftWorld(org.bukkit.craftbukkit.v1_11_R1.CraftWorld)

Example 3 with WorkingWolf

use of pl.plajer.villagedefense3.creatures.v1_11_R1.WorkingWolf in project Village_Defense by Plajer.

the class ArenaInitializer1_8_R3 method spawnWolf.

public void spawnWolf(Location location, Player player) {
    net.minecraft.server.v1_8_R3.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
    WorkingWolf wolf = new WorkingWolf(location.getWorld());
    wolf.setPosition(location.getX(), location.getY(), location.getZ());
    McWorld.addEntity(wolf, CreatureSpawnEvent.SpawnReason.CUSTOM);
    wolf.setCustomName(ChatManager.colorMessage("In-Game.Spawned-Wolf-Name").replaceAll("%player%", player.getName()));
    wolf.setCustomNameVisible(true);
    wolf.setInvisible(false);
    ((Wolf) wolf.getBukkitEntity()).setOwner(player);
    CreatureUtils.applyMetadata(wolf.getBukkitEntity(), this);
    this.addWolf((Wolf) wolf.getBukkitEntity());
}
Also used : WorkingWolf(pl.plajer.villagedefense3.creatures.v1_8_R3.WorkingWolf) WorkingWolf(pl.plajer.villagedefense3.creatures.v1_8_R3.WorkingWolf) Wolf(org.bukkit.entity.Wolf) CraftWorld(org.bukkit.craftbukkit.v1_8_R3.CraftWorld)

Example 4 with WorkingWolf

use of pl.plajer.villagedefense3.creatures.v1_11_R1.WorkingWolf in project Village_Defense by Plajer.

the class ArenaInitializer1_9_R1 method spawnWolf.

public void spawnWolf(Location location, Player player) {
    net.minecraft.server.v1_9_R1.World McWorld = ((CraftWorld) location.getWorld()).getHandle();
    WorkingWolf wolf = new WorkingWolf(location.getWorld());
    wolf.setPosition(location.getX(), location.getY(), location.getZ());
    McWorld.addEntity(wolf, CreatureSpawnEvent.SpawnReason.CUSTOM);
    wolf.setCustomName(ChatManager.colorMessage("In-Game.Spawned-Wolf-Name").replaceAll("%player%", player.getName()));
    wolf.setCustomNameVisible(true);
    wolf.setInvisible(false);
    CreatureUtils.applyMetadata(wolf.getBukkitEntity(), this);
    this.addWolf((Wolf) wolf.getBukkitEntity());
}
Also used : WorkingWolf(pl.plajer.villagedefense3.creatures.v1_9_R1.WorkingWolf) CraftWorld(org.bukkit.craftbukkit.v1_9_R1.CraftWorld)

Aggregations

Wolf (org.bukkit.entity.Wolf)3 CraftWorld (org.bukkit.craftbukkit.v1_11_R1.CraftWorld)1 CraftWorld (org.bukkit.craftbukkit.v1_12_R1.CraftWorld)1 CraftWorld (org.bukkit.craftbukkit.v1_8_R3.CraftWorld)1 CraftWorld (org.bukkit.craftbukkit.v1_9_R1.CraftWorld)1 WorkingWolf (pl.plajer.villagedefense3.creatures.v1_11_R1.WorkingWolf)1 WorkingWolf (pl.plajer.villagedefense3.creatures.v1_12_R1.WorkingWolf)1 WorkingWolf (pl.plajer.villagedefense3.creatures.v1_8_R3.WorkingWolf)1 WorkingWolf (pl.plajer.villagedefense3.creatures.v1_9_R1.WorkingWolf)1