Spawning mobs at users feet

Discussion in 'Plugin Development' started by SandKastle, Jul 13, 2013.

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

    SandKastle

    So for the plugin im trying to make i need to spawn a wolf at the users feet who used a command

    so something like

    *user types /spawn wolf*
    Then i need to wolf to spawn at the person who used the command feet.

    first plugin im working on like this and i have no clue how to start.
     
  2. Offline

    JazzaG

    SandKastle

    Code:
    player.getWorld().spawnEntity(player.getLocation(), EntityType.WOLF);
    
     
  3. Offline

    turqmelon

    player.getWorld().spawn(player.getLocation(), Wolf.class);?

    Dammit, ninja'd by JazzaG
     
  4. Offline

    SandKastle

    how would i set the spawned wolf tamed to the player who spawned it?
     
  5. Offline

    JazzaG


    Code:
    Wolf wolf = (Wolf) player.getWorld().spawnEntity(player.getLocation(), EntityType.WOLF);
    if(wolf != null) 
        wolf.setOwner(player);
     
Thread Status:
Not open for further replies.

Share This Page