Implemented spawnSheep method that stores the spawned sheep in the sheep array
This commit is contained in:
parent
df7adad359
commit
23d88c7808
@ -3,10 +3,13 @@ package gibstick.bukkit.DiscoSheep;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.entity.Sheep;
|
import org.bukkit.entity.Sheep;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
|
import org.bukkit.World;
|
||||||
|
|
||||||
public final class DiscoSheep extends JavaPlugin {
|
public final class DiscoSheep extends JavaPlugin {
|
||||||
|
|
||||||
private ArrayList<Sheep> SheepArray = new ArrayList<>();
|
private ArrayList<Sheep> sheepArray = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable(){
|
public void onEnable(){
|
||||||
@ -18,5 +21,9 @@ public final class DiscoSheep extends JavaPlugin {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void spawnSheep(World world, Location loc) {
|
||||||
|
sheepArray.add((Sheep)world.spawnEntity(loc, EntityType.SHEEP));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user