publicclassCommandsimplementsCommandExecutor{@OverridepublicbooleanonCommand(CommandSenders,Commandcmd,StringLabel,String[]args){if(sinstanceofPlayer){CustomEntitySheepces=CustomEntity.getNewCustomEntitySheep(((Player)s).getLocation());//Creates a new CustomSheepces.setUnpushable();//Makes the sheep unpushableces.setUnableToMove();//Makes the sheep unable to moveces.newPathfinderGoalTempt("DIAMOND");//Makes the sheep only move if a player nearby is holding a diamond}returnfalse;}}
Comments
To post a comment, please login or register a new account.
Comments