mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-22 04:37:42 +01:00
Fixed comp issue with ASkills
This commit is contained in:
parent
cd75819c39
commit
e43c1cfb89
@ -9,7 +9,6 @@ import com.archyx.aureliumskills.skills.Skills;
|
||||
import com.archyx.aureliumskills.stats.Stats;
|
||||
import io.lumine.mythic.lib.api.item.NBTItem;
|
||||
import io.lumine.mythic.lib.version.VersionMaterial;
|
||||
import io.lumine.utils.metadata.Empty;
|
||||
import net.Indyuce.mmoitems.MMOItems;
|
||||
import net.Indyuce.mmoitems.api.player.EmptyRPGPlayer;
|
||||
import net.Indyuce.mmoitems.api.player.PlayerData;
|
||||
@ -131,10 +130,8 @@ public class AureliumSkillsHook implements RPGHandler, Listener {
|
||||
|
||||
@Override
|
||||
public boolean canUse(RPGPlayer player, NBTItem item, boolean message) {
|
||||
if (!(player instanceof AureliumSkillsPlayer))
|
||||
return false;
|
||||
|
||||
int skillLevel = ((AureliumSkillsPlayer) player).info.getSkillLevel(skill);
|
||||
int skillLevel = player instanceof AureliumSkillsPlayer ? ((AureliumSkillsPlayer) player).info.getSkillLevel(skill) : 0;
|
||||
int required = item.getInteger("MMOITEMS_REQUIRED_" + skill.name());
|
||||
|
||||
if (skillLevel < required && !player.getPlayer().hasPermission("mmoitems.bypass.level")) {
|
||||
|
Loading…
Reference in New Issue
Block a user