This commit is contained in:
parent
dca1320275
commit
bce5b5a462
|
@ -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");
|
||||
}
|
||||
|
||||
}
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user