示例#1
0
	@Override
	public Map<String, String[]> getCommandAliases() {

		ConfigurationSection section = bukkitConfig.getConfigurationSection("aliases");
		Map<String, String[]> result = new LinkedHashMap<String, String[]>();

		if (section != null) {
			for (String key : section.getKeys(false)) {
				List<String> commands = null;

				if (section.isList(key)) {
					commands = section.getStringList(key);
				} else {
					commands = ImmutableList.<String>of(section.getString(key));
				}

				result.put(key, commands.toArray(new String[commands.size()]));
			}
		}

		return result;
	}