diff --git a/src/main/java/net/Indyuce/mmoitems/ability/Ability.java b/src/main/java/net/Indyuce/mmoitems/ability/Ability.java index 9bb7f0b7..3223b36e 100644 --- a/src/main/java/net/Indyuce/mmoitems/ability/Ability.java +++ b/src/main/java/net/Indyuce/mmoitems/ability/Ability.java @@ -70,7 +70,7 @@ public abstract class Ability extends SkillHandler RegisteredSkill registeredSkill = new RegisteredSkill(this); // Corresponding ability data - AbilityData abilityData = new AbilityData(registeredSkill, TriggerType.API); + AbilityData abilityData = new AbilityData(registeredSkill, TriggerType.CAST); for (String mod : modifiers.keySet()) abilityData.setModifier(mod, meta.getModifier(mod)); diff --git a/src/main/java/net/Indyuce/mmoitems/api/MMOItemsAPI.java b/src/main/java/net/Indyuce/mmoitems/api/MMOItemsAPI.java index a6b12ba1..28c464aa 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/MMOItemsAPI.java +++ b/src/main/java/net/Indyuce/mmoitems/api/MMOItemsAPI.java @@ -117,7 +117,7 @@ public class MMOItemsAPI { public AttackMetadata castAbility(Player player, String skillName, Map modifiers, @Nullable LivingEntity target, @Nullable AttackMetadata attackMeta) { // Setup ability - AbilityData abilityData = new AbilityData(getSkillById(skillName), TriggerType.API); + AbilityData abilityData = new AbilityData(getSkillById(skillName), TriggerType.CAST); modifiers.forEach((key, value) -> abilityData.setModifier(key, value)); // Cast ability @@ -158,7 +158,7 @@ public class MMOItemsAPI { * based on entity attacks; in that case no attack metadata is provided. */ public void castSkill(Player player, RegisteredSkill skill, @NotNull Map modifiers, @Nullable LivingEntity target, @Nullable AttackMetadata attackMeta) { - AbilityData castable = new AbilityData(skill, TriggerType.API); + AbilityData castable = new AbilityData(skill, TriggerType.CAST); modifiers.forEach((mod, value) -> castable.setModifier(mod, value)); PlayerMetadata caster = MMOPlayerData.get(player).getStatMap().cache(EquipmentSlot.MAIN_HAND); diff --git a/src/main/java/net/Indyuce/mmoitems/command/mmoitems/AbilityCommandTreeNode.java b/src/main/java/net/Indyuce/mmoitems/command/mmoitems/AbilityCommandTreeNode.java index a24504a9..e771ac20 100644 --- a/src/main/java/net/Indyuce/mmoitems/command/mmoitems/AbilityCommandTreeNode.java +++ b/src/main/java/net/Indyuce/mmoitems/command/mmoitems/AbilityCommandTreeNode.java @@ -60,7 +60,7 @@ public class AbilityCommandTreeNode extends CommandTreeNode { } // modifiers - AbilityData ability = new AbilityData(MMOItems.plugin.getSkills().getSkill(key), TriggerType.API); + AbilityData ability = new AbilityData(MMOItems.plugin.getSkills().getSkill(key), TriggerType.CAST); for (int j = 3; j < args.length - 1; j += 2) { String name = args[j]; String value = args[j + 1]; diff --git a/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java b/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java index 87a60b84..b5651aea 100644 --- a/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java +++ b/src/main/java/net/Indyuce/mmoitems/listener/PlayerListener.java @@ -332,7 +332,7 @@ public class PlayerListener implements Listener { } // Create ability data - AbilityData abilityData = new AbilityData(registeredSkill, TriggerType.API); + AbilityData abilityData = new AbilityData(registeredSkill, TriggerType.CAST); for (String mod : event.getCast().getHandler().getModifiers()) abilityData.setModifier(mod, event.getMetadata().getModifier(mod));