Can you spawn wolves that are tamed to a person

Discussion in 'Plugin Development' started by Relentless_x, Apr 25, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Relentless_x

    I want to be able to spawn wolves that are automatically tamed to the person that does the command is this possible?
     
  2. Offline

    Trucaur

    Try this :
    Code:
    CraftEntity craftWolf = (CraftEntity)world.spawnCreature(l, CreatureType.WOLF);
    EntityWolf wolf = (EntityWolf)craftWolf.getHandle();
    wolf.d(true);
    wolf.a((PathEntity) null);
    wolf.b(true);
    wolf.a(player.getName());
    For this code, you need to include CraftBukkit in your buildpath.
     
Thread Status:
Not open for further replies.

Share This Page