mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-02-02 11:21:20 +01:00
Fix unable to cast ability on latest version
This commit is contained in:
parent
e9e9222f02
commit
561788cbc8
@ -375,12 +375,15 @@ public class PlayerData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ItemAttackResult castAbilities(CachedStats stats, LivingEntity target, ItemAttackResult result, CastingMode castMode) {
|
public ItemAttackResult castAbilities(CachedStats stats, LivingEntity target, ItemAttackResult result, CastingMode castMode) {
|
||||||
if ((target == null && !MMOItems.plugin.getFlags().isFlagAllowed(player, CustomFlag.MI_ABILITIES))
|
if(target != null) {
|
||||||
|| !MMOItems.plugin.getFlags().isFlagAllowed(target.getLocation(), CustomFlag.MI_ABILITIES))
|
if(!MMOItems.plugin.getFlags().isFlagAllowed(player,CustomFlag.MI_ABILITIES)
|
||||||
|
|| !MMOItems.plugin.getFlags().isFlagAllowed(target.getLocation(), CustomFlag.MI_ABILITIES)
|
||||||
|
|| !MMOUtils.canDamage(player, target)) {
|
||||||
return result.setSuccessful(false);
|
return result.setSuccessful(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (target != null && !MMOUtils.canDamage(player, target))
|
|
||||||
return result.setSuccessful(false);
|
|
||||||
|
|
||||||
for (AbilityData ability : itemAbilities)
|
for (AbilityData ability : itemAbilities)
|
||||||
if (ability.getCastingMode() == castMode)
|
if (ability.getCastingMode() == castMode)
|
||||||
|
Loading…
Reference in New Issue
Block a user