@EventHandler(priority = EventPriority.HIGHEST)
	public void onjoin(PlayerJoinEvent e) {
		if (core.getDB().secplayers.containsKey(e.getPlayer().getName())) {
			SecretPlayer player = core.getDB().secplayers.get(e.getPlayer().getName());
			player.setInitialLocation(e.getPlayer().getLocation());
			if (!player.isLoggedIn()) {
				
				Configuration.log("Checking perms! " + Boolean.toString(Configuration.enableByPermission) + " - " + Boolean.toString(Permissions.LOGIN.check(e.getPlayer())));
				
				// check permissions.
				if (Configuration.enableByPermission && !Permissions.LOGIN.check(e.getPlayer())) {
					player.setLoggedIn(true);
					Configuration.log("Player doesn't need to use SecretWord!");
					return;
				}
				
				// nullify the join message if necessary
				if (Configuration.hideJoinNotifications && !Permissions.SHOWJOIN.check(e.getPlayer())) {
					player.setJoinMessage(e.getJoinMessage());
					e.setJoinMessage(null);
				}
				
				// check creative mode/strip it if necessary.
				player.setHasCreative(e.getPlayer().getGameMode() == GameMode.CREATIVE);
				
				// clear inventory
				// player.setInventory(e.getPlayer().getInventory().getContents());
				// e.getPlayer().getInventory().clear();
				
				// now lets check if registered or just stupid.
				if (!player.isRegistered()) {
					player.loadData();
					Configuration.log("User " + player.getName() + " will need to register.");
					player.getPlayer().sendMessage(Configuration.prefix + ChatColor.YELLOW + "Please enter a sentence, or a " + Configuration.minwordlength + "-letter word that you can remember.");
				} else {
					Configuration.log("User " + player.getName() + " will need to login.");
					player.getPlayer().sendMessage(Configuration.prefix + ChatColor.RED + "Please enter your secret word.");
				}
			}
		}
	}