Spawning more entities

Discussion in 'Plugin Development' started by Plukkies, Feb 17, 2015.

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

    Plukkies

    Hello Bukkit users,

    How to spawn more entities, I use
    w.spawnEntity(loc1, EntityType.BOAT);
    more times but I spawn's one boat.
     
  2. Offline

    CheesyFreezy

    You can use this line of code and make a for loop with integers. To repeat the code a couple of times.

    Usage:
    Code:
    for(int i=0;i</*Repeat amount*/;i++) {
       //Spawn a boat here
    }
    Example:
    Code:
    for(int i=0;i<15;i++) {
       w.spawnEntity(loc1, EntityType.BOAT);
    
       //Spawns 15 boats
    }
     
Thread Status:
Not open for further replies.

Share This Page