Skip to content

Commit

Permalink
Small typo
Browse files Browse the repository at this point in the history
  • Loading branch information
RedstoneFuture committed Dec 16, 2024
1 parent 3424b8a commit b8d9264
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ public static void load() {
// Get all arena files or create a new one
File[] arenaFiles = folder.listFiles();
if (arenaFiles.length == 0) {
File defaultArena = new File(folder, "arena0.yml");
File defaultConfig = new File(folder, "arena0.yml");
try {
defaultArena.createNewFile();
Serializer.serialize(defaultArena, new ArenaConfig());
defaultConfig.createNewFile();
Serializer.serialize(defaultConfig, new ArenaConfig());
} catch (IOException exception) {
Logger.ERROR.log("Could not create default arena config");
Logger.ERROR.log("As there are no arenas present, the plugin is shutting down");
exception.printStackTrace();
Bukkit.getPluginManager().disablePlugin(MissileWars.getInstance());
return;
}
arenaFiles = new File[] {defaultArena};
arenaFiles = new File[] {defaultConfig};
}

for (File config : arenaFiles) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,18 @@ public void loadGamesOnStartup() {
Logger.WARN.log("No game-configs found. Creating default one.");
File gamesFolder = new File(Config.getGamesFolder());
gamesFolder.mkdirs();
File defaultGame = new File(gamesFolder, Config.getDefaultGame());
File defaultConfig = new File(gamesFolder, Config.getDefaultGame());
try {
defaultGame.createNewFile();
Serializer.serialize(defaultGame, new GameConfig());
defaultConfig.createNewFile();
Serializer.serialize(defaultConfig, new GameConfig());
} catch (IOException exception) {
Logger.ERROR.log("Could not create default arena config");
Logger.ERROR.log("As there are no arenas present, the plugin is shutting down");
exception.printStackTrace();
Bukkit.getPluginManager().disablePlugin(MissileWars.getInstance());
return;
}
gameFiles = new File[] {defaultGame};
gameFiles = new File[] {defaultConfig};
}

for (File config : gameFiles) {
Expand Down

0 comments on commit b8d9264

Please sign in to comment.