All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sucy.skill.hook.mimic.ProSkillApiConverter Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.3.1-R1
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy