use of de.Keyle.MyPet.api.skill.skilltree.requirements.Requirement in project MyPet by xXKeyleXx.
the class Skilltree method checkRequirements.
public boolean checkRequirements(MyPet pet) {
boolean usable = true;
for (Settings flagSettings : requirementSettings) {
String reqName = flagSettings.getName();
Requirement requirement = MyPetApi.getSkilltreeManager().getRequirement(reqName);
if (requirement == null) {
MyPetApi.getLogger().warning("\"" + reqName + "\" is not a valid skilltree requirement!");
continue;
}
if (!requirement.check(this, pet, flagSettings)) {
usable = false;
}
if (!usable) {
break;
}
}
return usable;
}
Aggregations