package me.jet315.minions.minions.types; import me.jet315.minions.minions.Minion; import me.jet315.minions.minions.MinionEntity; import me.jet315.minions.utils.MinionFace; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; //Must implement Minion class public class CustomMinion extends Minion { //Must implement default constructor public CustomMinion(Player p, boolean useHealth, int actionsAllowedPerHeathDrop, int health, int totalActionsProcessed, MinionEntity minionEntity, MinionFace direction, ItemStack minionDisplayItem, int level) { super(p, useHealth, actionsAllowedPerHeathDrop, health, totalActionsProcessed, minionEntity, direction, minionDisplayItem, level); } //The minions identifier, IE "Miner" or "Slayer" @Override public String getIdentifier() { return null; } //Your name @Override public String getAuthor() { return null; } //Code that is ran when the minion is loaded for the very first time @Override public void onFirstSpawn() { } //Code that is ran when the minion is loaded @Override public void onLoad() { } @Override public void performAction() { if (inSpawnAnimation) return; // I suggest not performing any action if the minion is in the spawn animation super.performAction(); //This is needed //Good methods: getMinion(); getMinion().getArmorStand(); getMinion().getAttachedChest(); //Use getMinion().hasMinionGotAttachedChest() before getting the chest getLevel(); //Maybe you want to do different stuff depending on the level? } /** * You DO NOT NEED TO OVERRIDE THIS METHOD, and I suggest you don't really as creating animations is a pretty long and annoying task */ @Override public void performAnimation() { /** * If you want to create your own animation, then you need to create EulaAngles for a part of the minion (like the arm) and each time this method is called perform the next animation * * What I suggest you do: * have a counter variable, each time this method is called +1 to it * check if counter variable is bigger than the list, if so reset it back to 0 * Create a list of EulaAngles so: (ArmMovement1,ArmMovement2,ArmMovement3,ArmMovement2,ArmMovement1) * then each time this method is called, use * getMinion().getArmorStand().setRightArmPose(listName[counter]); * * I suggest playing around with this * Creating animations is a pretty annoying task though, if the default animation is cool enough, then I suggest you use this. * */ } }