Changed access of sheep, added ShepDeshearer.
This commit is contained in:
parent
65122cc098
commit
76bded66df
@ -26,11 +26,15 @@ public final class DiscoSheep extends JavaPlugin {
|
||||
// Watashi Wa Kawaii, Ne?
|
||||
}
|
||||
|
||||
ArrayList<Sheep> getSheep(){
|
||||
return sheepArray;
|
||||
}
|
||||
|
||||
void spawnSheep(World world, Location loc) {
|
||||
Sheep newSheep = (Sheep) world.spawnEntity(loc, EntityType.SHEEP);
|
||||
newSheep.setMaxHealth(10000);
|
||||
newSheep.setHealth(10000);
|
||||
sheepArray.add(newSheep);
|
||||
getSheep().add(newSheep);
|
||||
}
|
||||
|
||||
// Spawn some number of sheep next to given player
|
||||
@ -53,15 +57,15 @@ public final class DiscoSheep extends JavaPlugin {
|
||||
|
||||
// Mark all sheep in the sheep array for removal, then clear the array
|
||||
void removeAllSheep() {
|
||||
for (int i = 0; i < sheepArray.size(); i++) {
|
||||
sheepArray.get(i).remove();
|
||||
for (Sheep sheep: getSheep()) {
|
||||
sheep.remove();
|
||||
}
|
||||
sheepArray.clear();
|
||||
getSheep().clear();
|
||||
}
|
||||
|
||||
// Cycle colours of all sheep in the array
|
||||
void cycleSheepColours() {
|
||||
for (int i = 0; i < sheepArray.size(); i++) {
|
||||
for (Sheep shep : getSheep()) {
|
||||
//sheepArray.get(i) something something
|
||||
}
|
||||
}
|
||||
|
17
src/gibstick/bukkit/discosheep/SheepDeshearer.java
Normal file
17
src/gibstick/bukkit/discosheep/SheepDeshearer.java
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package gibstick.bukkit.discosheep;
|
||||
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Mauve
|
||||
*/
|
||||
public class SheepDeshearer implements Listener{
|
||||
public SheepDeshearer(DiscoSheep parent){
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user