* @param client
	 */
	private void cmd_nameref(final String arg, final Client client) {
		final Player player = getPlayer(client);

		final String[] args = arg.split(" ");

		boolean globalNameRefs = false;

		if (player.getConfig() != null) {
			if (player.getConfigOption("global-nameref-table")) {
				globalNameRefs = true;
			}
		}

		if (!globalNameRefs) {
			if (arg.toLowerCase().equals("#list")) {
				send("Name Reference Table", client);
				send("------------------------------------------------", client);

				for (String str : player.getNameReferences()) {
					send(str + " -> " + player.getNameRef(str), client);
				}

				send("------------------------------------------------", client);
			}
			else if (arg.toLowerCase().equals("#clear")) {
				player.clearNameRefs();
				send("Name Reference Table cleared!", client);
			}
			else if (args.length == 2) {
				if (args[0].equals("#delete")) {
					player.getNameReferences().remove(args[1]);
					send("nameRef deleted.", client);
				}
				else {
					try {
						player.setNameRef(args[0], Integer.parseInt(args[1]));
						send("nameRef allocated.", client);
						send(args[0].substring(0, args[0].length()) + " allocated to " + args[1], client);
					}
					catch (final NumberFormatException nfe) {
						System.out.println("--- Stack Trace ---");
						nfe.printStackTrace();
					}
				}
			}
		}
		else {
			if (arg.toLowerCase().equals("#list")) {
				send("Name Reference Table (Global)", client);
				send("------------------------------------------------", client);

				for (String str : getNameReferences()) {
					send(str + " -> " + getNameRef(str), client);
				}

				send("------------------------------------------------", client);
			}
			else if (arg.toLowerCase().equals("#clear")) {
				clearNameRefs();
				send("Name Reference Table cleared!", client);
			}
			else if (args.length == 2) {
				if (args[0].equals("#delete")) {
					getNameReferences().remove(args[1]);
					send("nameRef deleted.", client);
				}
				else {
					try {
						setNameRef(args[0], Integer.parseInt(args[1]));
						send("nameRef allocated.", client);
						send(args[0].substring(0, args[0].length()) + " allocated to " + args[1], client);
					}
					catch (final NumberFormatException nfe) {
						System.out.println("--- Stack Trace ---");
						nfe.printStackTrace();
					}
				}
			}
		}
	}