Java Code Examples for ninja.leaping.configurate.ConfigurationNode#getList()

The following examples show how to use ninja.leaping.configurate.ConfigurationNode#getList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConfigurateConfigAdapter.java    From LuckPerms with MIT License 5 votes vote down vote up
@Override
public List<String> getStringList(String path, List<String> def) {
    ConfigurationNode node = resolvePath(path);
    if (node.isVirtual() || !node.hasListChildren()) {
        return def;
    }

    return node.getList(Object::toString);
}
 
Example 2
Source File: PlayerFilter.java    From Web-API with MIT License 5 votes vote down vote up
public PlayerFilter(WebHook hook, ConfigurationNode config) {
    super(hook, config);

    try {
        players = config.getList(TypeToken.of(String.class));
    } catch (ObjectMappingException e) {
        e.printStackTrace();
    }
}
 
Example 3
Source File: BlockTypeFilter.java    From Web-API with MIT License 5 votes vote down vote up
public BlockTypeFilter(WebHook hook, ConfigurationNode config) {
    super(hook, config);

    try {
        types = config.getList(TypeToken.of(BlockType.class));
    } catch (ObjectMappingException e) {
        e.printStackTrace();
    }
}
 
Example 4
Source File: ItemTypeFilter.java    From Web-API with MIT License 5 votes vote down vote up
public ItemTypeFilter(WebHook hook, ConfigurationNode config) {
    super(hook, config);

    try {
        items = config.getList(TypeToken.of(ItemType.class));
    } catch (ObjectMappingException e) {
        e.printStackTrace();
    }
}