Added random sheep colour upon spawn

This commit is contained in:
Charlie Wang 2013-06-30 16:44:22 -04:00
parent 572cb5a9d6
commit 803470a76b

View File

@ -50,6 +50,7 @@ public final class DiscoSheep extends JavaPlugin {
Sheep newSheep = (Sheep) world.spawnEntity(loc, EntityType.SHEEP);
newSheep.setMaxHealth(10000);
newSheep.setHealth(10000);
newSheep.setColor(discoColours[(int) Math.random() * discoColours.length]);
getSheep().add(newSheep);
}