Cleanup
Some checks are pending
Build plugin / build (push) Waiting to run

This commit is contained in:
2vb 2024-07-02 23:11:46 -07:00
parent dca1320275
commit bce5b5a462
2 changed files with 1 additions and 12 deletions

View File

@ -47,7 +47,6 @@ public class GameManager {
}
public void initGame(Minigame game, CommandSender owner, String level) {
// World world = createGameWorld(level);
try {
game.init(owner, level);
} catch (IOException e) {
@ -57,14 +56,6 @@ public class GameManager {
activeGames.put(game.getGameId(), game);
}
// private World createGameWorld(String name) {
// WorldCreator wc = new WorldCreator(LevelManager.path + name, new NamespacedKey(SGM.getInstance(), name + "-" + UUID.randomUUID()));
// World world = wc.createWorld();
// if (world == null) return null;
// world.setAutoSave(false);
// return world;
// }
public void addPlayerToGame(Player player, UUID gameId) {
Minigame game = findGame(gameId);
if (game.getState() == Minigame.GameState.READY && !game.getPlayers().contains(player) && !isInGame(player)) {
@ -80,8 +71,6 @@ public class GameManager {
public void registerGame(Minigame game) {
registeredGames.add(game.getName().toLowerCase());
SGM.getInstance().getCLogger().log("Registered game " + game.getName());
SGM.getInstance().getCLogger().log(registeredGames);
// registeredGames.add("ctb");
}
}

View File

@ -132,7 +132,7 @@ public class LevelManager {
enabledMaps.put(game, new ArrayList<>()); // Initialize an empty ArrayList for each game
}
// List all files (worlds) in the folder
File folder = new File(levelPath);
File folder = new File(mapPath);
File[] files = folder.listFiles();
if (files != null) {
for (File file : files) {