forked from Upstream/mmocore
Fixed an issue with enchant plugins + enchant exp source
This commit is contained in:
parent
0ae7c3613d
commit
a0685334e1
@ -4,6 +4,8 @@ import io.lumine.mythic.lib.MythicLib;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -31,8 +33,11 @@ public class EnchantManager extends SpecificProfessionManager {
|
||||
base.put(enchant, value);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public double getBaseExperience(Enchantment enchant) {
|
||||
return base.get(enchant);
|
||||
// Can be null if argument passed is an enchant with no config attached to it
|
||||
@Nullable Double found = base.get(enchant);
|
||||
return found == null ? 0 : found;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user