private void timer() {
        for (World w : gmtWorlds) {
            String name = w.getName();
            // only switch if there are players in the world
            if (gmtPlayerCount.containsKey(name)) {
                Long now = w.getTime();
                Long time = getConfig().getLong("worlds." + w.getName() + ".time");
                GameMode change = GameMode.valueOf(getConfig().getString("worlds." + w.getName() + ".gamemode"));
                if (now >= time) {
                    if (!gmtHasSwitched.contains(name)) {
                        gmtHasSwitched.add(name);
                        gmtLastManStandingStart.put(name, now);
                    }
                    // get players in this world
                    List<Player> players = w.getPlayers();
                    for (Player p : players) {
                        GameMode gm = p.getGameMode();
                        if (!gm.equals(change) && !p.hasPermission("gamemodetimer.bypass") && p.isOnline()) {
                            p.setGameMode(change);
                        }
                    }
                }
            }
        }
    }