public void register(Class<?> clazz) {

		List<org.bukkit.command.Command> registeredCommands = new LinkedList<>();

		Object obj = null;
		try {
			obj = clazz.newInstance();
		} catch (IllegalAccessException | InstantiationException e) {
			this.log("Couldn't register command for " + clazz.getCanonicalName());
		}

		if (obj == null)
			return;

		for (Method method: clazz.getMethods()) {

			// non command method
			if (!method.isAnnotationPresent(Command.class))
				continue;

			Command command = method.getAnnotation(Command.class);

			if (isRegistered(command.name())) {
				log("Command " + command.name() + " from " + clazz.getCanonicalName() + " is already registered.");
				continue;
			}

			this.commands.put(method, obj);
			this.aliases.put(command.name(), method);
			for (String alias: command.aliases()) {
				this.aliases.put(alias, method);
			}

			// Create a new Command
			org.bukkit.command.Command pluginCommand;
			pluginCommand = new PluginCommand(plugin, command.name());
			pluginCommand.setAliases(Arrays.asList(command.aliases()));
			pluginCommand.setUsage(command.usage());
			pluginCommand.setDescription(command.description());
			pluginCommand.setPermission(command.permission());
			registeredCommands.add(pluginCommand);
			log("registering new command: " + pluginCommand.getName());
		}

		server.getCommandMap().registerAll(plugin.getName(), registeredCommands);
	}