mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-09 07:37:34 +01:00
Fixed a player login issue with ASkills
This commit is contained in:
parent
b35a651c6d
commit
4dac3c1445
@ -1,7 +1,7 @@
|
|||||||
package net.Indyuce.mmoitems.api.player;
|
package net.Indyuce.mmoitems.api.player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temporarily used by MMOItems when plugins like AureliumSkills don't laod player
|
* Temporarily used by MMOItems when plugins like AureliumSkills don't load player
|
||||||
* data right on player startup, which means the player data instance can't
|
* data right on player startup, which means the player data instance can't
|
||||||
* directly be cached by MMOItems.
|
* directly be cached by MMOItems.
|
||||||
*
|
*
|
||||||
|
@ -9,6 +9,7 @@ import com.archyx.aureliumskills.skills.Skills;
|
|||||||
import com.archyx.aureliumskills.stats.Stats;
|
import com.archyx.aureliumskills.stats.Stats;
|
||||||
import io.lumine.mythic.lib.api.item.NBTItem;
|
import io.lumine.mythic.lib.api.item.NBTItem;
|
||||||
import io.lumine.mythic.lib.version.VersionMaterial;
|
import io.lumine.mythic.lib.version.VersionMaterial;
|
||||||
|
import io.lumine.utils.metadata.Empty;
|
||||||
import net.Indyuce.mmoitems.MMOItems;
|
import net.Indyuce.mmoitems.MMOItems;
|
||||||
import net.Indyuce.mmoitems.api.player.EmptyRPGPlayer;
|
import net.Indyuce.mmoitems.api.player.EmptyRPGPlayer;
|
||||||
import net.Indyuce.mmoitems.api.player.PlayerData;
|
import net.Indyuce.mmoitems.api.player.PlayerData;
|
||||||
@ -130,6 +131,9 @@ public class AureliumSkillsHook implements RPGHandler, Listener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canUse(RPGPlayer player, NBTItem item, boolean message) {
|
public boolean canUse(RPGPlayer player, NBTItem item, boolean message) {
|
||||||
|
if (!(player instanceof AureliumSkillsPlayer))
|
||||||
|
return false;
|
||||||
|
|
||||||
int skillLevel = ((AureliumSkillsPlayer) player).info.getSkillLevel(skill);
|
int skillLevel = ((AureliumSkillsPlayer) player).info.getSkillLevel(skill);
|
||||||
int required = item.getInteger("MMOITEMS_REQUIRED_" + skill.name());
|
int required = item.getInteger("MMOITEMS_REQUIRED_" + skill.name());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user