Critical Bugfix

Fixed an issue where plugin was loading player configurations from ./plugins/FeelingLucky instead of ./plugins/FeelingLucky/players
This commit is contained in:
Paldiu 2022-05-16 20:59:49 -05:00
parent 07c4e5d50c
commit 73e5be91eb
2 changed files with 7 additions and 2 deletions

View File

@ -3,7 +3,7 @@ plugins {
}
group = 'io.github.simplex'
version = 'Beta-1.0'
version = 'Beta-1.0.1'
repositories {
mavenCentral()

View File

@ -18,6 +18,7 @@ import java.util.UUID;
public final class FeelingLucky extends JavaPlugin {
private final Map<UUID, PlayerConfig> configMap = new HashMap<>();
private final File playerDirectory = new File(getDataFolder(), "players");
private PlayerHandler handler;
private Config config;
@ -55,7 +56,11 @@ public final class FeelingLucky extends JavaPlugin {
}
private void loadPlayerConfigurations() {
File[] files = getDataFolder().listFiles();
if (!playerDirectory.exists()) {
playerDirectory.mkdirs();
}
File[] files = playerDirectory.listFiles();
if (files != null) {
Arrays.stream(files).forEach(file -> {
UUID uuid = UUID.fromString(file.getName().split("\\.")[0]);