Bukkit.getServer().getWorld(args[0]).spawnEntity();

Discussion in 'Plugin Development' started by tamajpm, Jul 29, 2013.

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

    tamajpm

    Hello everyone,

    I have little problem at the moment. I want to make a plugin where you can spawn mobs with custom amounts. I have this code for it right now:

    Bukkit.getServer().getWorld(args[0]).spawnEntity(player.getLocation(), EntityType.ZOMBIE);

    But how can i set the amount that it is spawning?
     
  2. Offline

    Firefly

    Put that code in a for loop (preferably storing the "Bukkit.getServer().getWorld(args[0]) in a World variable beforehand). The for loop will allow you to execute that piece of code numerous times.
     
Thread Status:
Not open for further replies.

Share This Page