Помогите Проверить существование строки в конфиге

Fenix78563

Активный участник
Пользователь
Баллы
76
Имя в Minecraft
Blc_Dragon
доброго времени суток, форумчане. вопрос ↑

Заранее спасибо
 
ConfigurationSection#contains(String path) для проверки пути, и ConfigurationSection#isSet(String path) для проверки наличия значения.
 
эклипс материт, говорит что так нельзя.

Проблему решил массивом и циклом. Спасибо за помощь
 
К сожалению, у меня нечего включать :)
Дам кусочки из исходников.
ConfigurationSection.java:
Java:
    /**
     * Checks if this {@link ConfigurationSection} contains the given path.
     * <p>
     * If the value for the requested path does not exist but a default value
     * has been specified, this will return true.
     *
     * @param path Path to check for existence.
     * @return True if this section contains the requested path, either via
     *     default or being set.
     * @throws IllegalArgumentException Thrown when path is null.
     */
    public boolean contains(String path);

    /**
     * Checks if this {@link ConfigurationSection} has a value set for the
     * given path.
     * <p>
     * If the value for the requested path does not exist but a default value
     * has been specified, this will still return false.
     *
     * @param path Path to check for existence.
     * @return True if this section contains the requested path, regardless of
     *     having a default.
     * @throws IllegalArgumentException Thrown when path is null.
     */
    public boolean isSet(String path);
 
Назад
Верх