@EventHandler
    public void onTeleportToWorld(PlayerTeleportEvent event) {
        Player p = event.getPlayer();
        String tow = event.getTo().getWorld().getName();
        if (plugin.getConfig().getBoolean("worlds." + tow + ".enabled") && plugin.getConfig().getInt("worlds." + tow + ".players") != -1) {
            int num = 0;
            int limit = plugin.getConfig().getInt("worlds." + tow + ".players");
            if (plugin.gmtPlayerCount.containsKey(tow)) {
                num = plugin.gmtPlayerCount.get(tow);
            }
            p.sendMessage("Player count in this world is: " + num);
            if (num < limit && !plugin.gmtHasSwitched.contains(tow)) {
                if (num == 0 && plugin.getConfig().getBoolean("worlds." + tow + ".set_morning")) {
                    //first player in world set time to 0
                    event.getTo().getWorld().setTime(0);
                }
                plugin.gmtPlayerCount.put(tow, num + 1);
                p.sendMessage("You joined, player count is now: " + plugin.gmtPlayerCount.get(tow));
                p.sendMessage(plugin.MY_PLUGIN_NAME + "Welcome to " + tow + ". Your game mode will be switched to " + plugin.getConfig().getString("worlds." + tow + ".gamemode") + " at " + plugin.getConfig().getString("worlds." + tow + ".time") + ". We suggest you get busy!");
            } else {
                event.setCancelled(true);
                if (plugin.gmtHasSwitched.contains(tow)) {
                    p.sendMessage(plugin.MY_PLUGIN_NAME + "We're sorry but " + tow + " has has already switched game modes, try joining again later!");
                } else {
                    p.sendMessage(plugin.MY_PLUGIN_NAME + "We're sorry but " + tow + " has reached the maximum number of players!");
                }
            }
        }
    }