package markehme.FactionsPerms.listeners;

import markehme.FactionsPerms.FactionsPerms;

import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerLoginEvent.Result;

public class ReadyCheck implements Listener {
	
	/**
	 * Checks if FactionsPerms is ready 
	 * @param event
	 */
	@EventHandler(priority = EventPriority.HIGH)
	public void onLogin(PlayerLoginEvent event) {
		if(!FactionsPerms.isReady) {
			event.disallow(Result.KICK_OTHER, "Server is still starting up.. please try again.");
			return;
		}
		
		if(!FactionsPerms.userSet.containsKey(event.getPlayer().getName().toLowerCase())) {
			
		}
	}
}

@@ -32,24 +32,110 @@
 listeners;%0A%0A
+import java.io.IOException;%0Aimport java.util.Arrays;%0Aimport java.util.logging.Level;%0A%0A
 import marke
@@ -818,16 +818,548 @@
 )) %7B%0A%09%09%09
+FactionsPerms.get().getLogger().log(Level.INFO, %22Adding %22 + event.getPlayer().getName() + %22 to default group%22);%0A%09%09%09FactionsPerms.usersConfig.set(%22Users.%22 + event.getPlayer().getName() + %22.groups%22, Arrays.asList(%22default%22));%0A%09%09%09FactionsPerms.usersConfig.set(%22Users.%22 + event.getPlayer().getName() + %22.permissions%22, Arrays.asList(%22%22));%0A%09%09%09%0A%09%09%09FactionsPerms.loadUser(event.getPlayer().getName());%0A%09%09%09%0A%09%09%09try %7B%0A%09%09%09%09FactionsPerms.usersConfig.save(FactionsPerms.usersConfigFile);%0A%09%09%09%7D catch (IOException e) %7B%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D
 %0A%09%09%7D%0A%09%7D%0A

Add no-defined users to the 'default' group