declared spawnSheep, removeAllSheep and cycleSheepColours for later use
This commit is contained in:
parent
23d88c7808
commit
b22d2a625c
@ -6,6 +6,7 @@ import org.bukkit.entity.Sheep;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public final class DiscoSheep extends JavaPlugin {
|
public final class DiscoSheep extends JavaPlugin {
|
||||||
|
|
||||||
@ -18,12 +19,31 @@ public final class DiscoSheep extends JavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void spawnSheep(World world, Location loc) {
|
public void spawnSheep(World world, Location loc) {
|
||||||
sheepArray.add((Sheep) world.spawnEntity(loc, EntityType.SHEEP));
|
sheepArray.add((Sheep) world.spawnEntity(loc, EntityType.SHEEP));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Spawn some number of sheep next to given player
|
||||||
|
public void spawnSheep(Player player, Location loc, int num) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mark all sheep in the sheep array for removal
|
||||||
|
public void removeAllSheep() {
|
||||||
|
for (int i = 0; i < sheepArray.size(); i++) {
|
||||||
|
sheepArray.get(i).remove();
|
||||||
|
}
|
||||||
|
sheepArray.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cycle colours of all sheep in the array
|
||||||
|
public void cycleSheepColours() {
|
||||||
|
for (int i = 0; i < sheepArray.size(); i++) {
|
||||||
|
//sheepArray.get(i) something something
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user