com.sucy.skill.hook.mimic.ProSkillApiConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proskillapi Show documentation
Show all versions of proskillapi Show documentation
A Minecraft Bukkit plugin aiming to provide an easy code API and skill editor for all server owners to
create unique and fully custom classes and skills.
package com.sucy.skill.hook.mimic;
import com.sucy.skill.SkillAPI;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import ru.endlesscode.mimic.level.ExpLevelConverter;
public class ProSkillApiConverter implements ExpLevelConverter {
@Nullable
private static ProSkillApiConverter instance;
public static @NotNull ExpLevelConverter getInstance() {
if (instance == null) {
instance = new ProSkillApiConverter();
}
return instance;
}
@Override
public double getExpToReachLevel(int level) {
return getExpToReachNextLevel(level - 1);
}
@Override
public double getExpToReachNextLevel(int level) {
return level > 0 ? SkillAPI.getSettings().getRequiredExp(level) : -1.0;
}
}