Example Sheep

Example code for a sheep

public class Commands implements CommandExecutor{

	public boolean onCommand(CommandSender s, Command cmd, String Label, String[] args) {
		if(s instanceof Player){
			CustomEntitySheep ces = CustomEntity.getNewCustomEntitySheep(((Player)s).getLocation());//Creates a new CustomSheep
			ces.setUnpushable();//Makes the sheep unpushable
			ces.setUnableToMove();//Makes the sheep unable to move
			ces.newPathfinderGoalTempt("DIAMOND");//Makes the sheep only move if a player nearby is holding a diamond
		return false;



Posts Quoted:
Clear All Quotes