This commit is contained in:
Paldiu
2022-03-20 13:09:24 -05:00
parent dcd7f7401c
commit 831913c668
14 changed files with 232 additions and 159 deletions

View File

@ -0,0 +1,29 @@
package io.github.simplex.luck;
import io.github.simplex.luck.player.PlayerConfig;
import io.github.simplex.luck.player.PlayerHandler;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.ArrayList;
import java.util.List;
public final class FeelingLucky extends JavaPlugin {
public PlayerHandler handler;
private static final List<PlayerConfig> configList = new ArrayList<>();
@Override
public void onEnable() {
handler = new PlayerHandler(this);
configList.forEach(PlayerConfig::load);
this.getServer().getPluginManager().registerEvents(handler, this);
}
@Override
public void onDisable() {
configList.forEach(PlayerConfig::save);
}
public static List<PlayerConfig> getConfigList() {
return configList;
}
}