當前位置: 首頁>>代碼示例>>Java>>正文


Java ConfigurationNode.getBoolean方法代碼示例

本文整理匯總了Java中ninja.leaping.configurate.ConfigurationNode.getBoolean方法的典型用法代碼示例。如果您正苦於以下問題:Java ConfigurationNode.getBoolean方法的具體用法?Java ConfigurationNode.getBoolean怎麽用?Java ConfigurationNode.getBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ninja.leaping.configurate.ConfigurationNode的用法示例。


在下文中一共展示了ConfigurationNode.getBoolean方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: BlockCase

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public BlockCase(ConfigurationNode node) {
    super(node);
    try {
        ConfigurationNode location_node = node.getNode("LOCATION");
        ConfigurationNode hologram_node = node.getNode("HOLOGRAM");
        ConfigurationNode start_preview_on_left_click_node = node.getNode("START_PREVIEW_ON_LEFT_CLICK");
        if (location_node.isVirtual()) {
            throw new RuntimeException("LOCATION node does not exist!");
        }
        location = Utils.parseLocation(location_node);
        if (!hologram_node.isVirtual()) {
            hologram = Optional.of(TextSerializers.FORMATTING_CODE.deserialize(hologram_node.getString()));
        }
        created_hologram = Utils.tryCreateHologram(location, hologram);
        start_preview_on_left_click = start_preview_on_left_click_node.getBoolean(false);
    } catch (Exception e) {
        GWMCrates.getInstance().getLogger().warn("Exception creating Block Case!", e);
    }
}
 
開發者ID:GreWeMa,項目名稱:gwm_Crates,代碼行數:20,代碼來源:BlockCase.java

示例2: MultiDrop

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public MultiDrop(ConfigurationNode node) {
    super(node);
    try {
        ConfigurationNode drops_node = node.getNode("DROPS");
        ConfigurationNode give_all_node = node.getNode("GIVE_ALL");
        if (drops_node.isVirtual()) {
            throw new RuntimeException("DROPS node does not exist");
        }
        drops = new ArrayList<Drop>();
        for (ConfigurationNode drop_node : drops_node.getChildrenList()) {
            drops.add((Drop) Utils.createSuperObject(drop_node, SuperObjectType.DROP));
        }
        give_all = give_all_node.getBoolean(true);
    } catch (Exception e) {
        throw new RuntimeException("Exception creating Multi Drop!", e);
    }
}
 
開發者ID:GreWeMa,項目名稱:gwm_Crates,代碼行數:18,代碼來源:MultiDrop.java

示例3: MultiKey

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public MultiKey(ConfigurationNode node) {
    super(node);
    try {
        ConfigurationNode keys_node = node.getNode("KEYS");
        ConfigurationNode all_keys_needed_node = node.getNode("ALL_KEYS_NEEDED");
        if (keys_node.isVirtual()) {
            throw new RuntimeException("KEYS node does not exist");
        }
        keys = new ArrayList<Key>();
        for (ConfigurationNode key_node : keys_node.getChildrenList()) {
            keys.add((Key) Utils.createSuperObject(key_node, SuperObjectType.KEY));
        }
        all_keys_needed = all_keys_needed_node.getBoolean(false);
    } catch (Exception e) {
        throw new RuntimeException("Exception creating Multi Key!", e);
    }
}
 
開發者ID:GreWeMa,項目名稱:gwm_Crates,代碼行數:18,代碼來源:MultiKey.java

示例4: EntityCase

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public EntityCase(ConfigurationNode node) {
    super(node);
    try {
        ConfigurationNode entity_uuid_node = node.getNode("ENTITY_UUID");
        ConfigurationNode start_preview_on_left_click_node = node.getNode("START_PREVIEW_ON_LEFT_CLICK");
        if (entity_uuid_node.isVirtual()) {
            throw new RuntimeException("ENTITY_UUID node does not exist!");
        }
        entity_uuid = entity_uuid_node.getValue(TypeToken.of(UUID.class));
        start_preview_on_left_click = start_preview_on_left_click_node.getBoolean(false);
    } catch (Exception e) {
        throw new RuntimeException("Exception creating Entity Case!", e);
    }
}
 
開發者ID:GreWeMa,項目名稱:gwm_Crates,代碼行數:15,代碼來源:EntityCase.java

示例5: ItemCase

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public ItemCase(ConfigurationNode node) {
    super(node);
    try {
        ConfigurationNode item_node = node.getNode("ITEM");
        ConfigurationNode start_preview_on_left_click_node = node.getNode("START_PREVIEW_ON_LEFT_CLICK");
        if (item_node.isVirtual()) {
            throw new RuntimeException("ITEM node does not exist!");
        }
        item = Utils.parseItem(item_node);
        start_preview_on_left_click = start_preview_on_left_click_node.getBoolean(false);
    } catch (Exception e) {
        throw new RuntimeException("Exception creating Item Case!", e);
    }
}
 
開發者ID:GreWeMa,項目名稱:gwm_Crates,代碼行數:15,代碼來源:ItemCase.java

示例6: OrderedChangeMode

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public OrderedChangeMode(ConfigurationNode node) {
    super(node);
    try {
        ConfigurationNode right_node = node.getNode("RIGHT");
        right = right_node.getBoolean(false);
    } catch (Exception e) {
        throw new RuntimeException("Exception creating Ordered First Gui Decorative Items Change Mode!", e);
    }
}
 
開發者ID:GreWeMa,項目名稱:gwm_Crates,代碼行數:10,代碼來源:OrderedChangeMode.java

示例7: parseCommand

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static CommandsDrop.Command parseCommand(ConfigurationNode node) {
    ConfigurationNode cmd_node = node.getNode("CMD");
    ConfigurationNode console_node = node.getNode("CONSOLE");
    if (cmd_node.isVirtual()) {
        throw new RuntimeException("CMD node does not exist!");
    }
    String cmd = cmd_node.getString();
    boolean console = console_node.getBoolean(true);
    return new CommandsDrop.Command(cmd, console);
}
 
開發者ID:GreWeMa,項目名稱:gwm_Crates,代碼行數:11,代碼來源:Utils.java

示例8: getAllianceFriendlyFire

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static boolean getAllianceFriendlyFire()
{
    ConfigurationNode friendlyFireNode = ConfigAccess.getConfig(mainConfig).getNode("eaglefactions", "friendlyFire", "alliance");

    Boolean friendlyFire = friendlyFireNode.getBoolean();

    return friendlyFire;
}
 
開發者ID:Aquerr,項目名稱:EagleFactions,代碼行數:9,代碼來源:MainLogic.java

示例9: getMobSpawning

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static boolean getMobSpawning()
{
    ConfigurationNode mobSpawningNode = ConfigAccess.getConfig(mainConfig).getNode("eaglefactions", "spawn", "mobs");

    boolean mobSpawning = mobSpawningNode.getBoolean();

    return mobSpawning;
}
 
開發者ID:Aquerr,項目名稱:EagleFactions,代碼行數:9,代碼來源:MainLogic.java

示例10: getBlockEnteringFactions

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static boolean getBlockEnteringFactions()
{
    ConfigurationNode mobSpawningNode = ConfigAccess.getConfig(mainConfig).getNode("eaglefactions", "gameplay", "blockEnteringFactions");

    boolean mobSpawning = mobSpawningNode.getBoolean();

    return mobSpawning;
}
 
開發者ID:Aquerr,項目名稱:EagleFactions,代碼行數:9,代碼來源:MainLogic.java

示例11: shouldBlockSafeZoneFromWarZone

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static boolean shouldBlockSafeZoneFromWarZone()
{
    ConfigurationNode blockSafeZoneFromWarZoneNode = ConfigAccess.getConfig(mainConfig).getNode("eaglefactions", "gameplay", "blockSafeZoneWhileInWarZone");

    boolean blockSafeZoneFromWarZone = blockSafeZoneFromWarZoneNode.getBoolean();

    return blockSafeZoneFromWarZone;
}
 
開發者ID:Aquerr,項目名稱:EagleFactions,代碼行數:9,代碼來源:MainLogic.java

示例12: isPlayerLimit

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static boolean isPlayerLimit()
{
    ConfigurationNode isPlayerLimitNode = ConfigAccess.getConfig(mainConfig).getNode("eaglefactions", "playerlimit", "playerlimit");

    boolean playerLimit = isPlayerLimitNode.getBoolean();

    return playerLimit;
}
 
開發者ID:Aquerr,項目名稱:EagleFactions,代碼行數:9,代碼來源:MainLogic.java

示例13: shouldDisplayRank

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static Boolean shouldDisplayRank()
{
    ConfigurationNode rankNode = ConfigAccess.getConfig(mainConfig).getNode("eaglefactions", "chat", "factionrank");

    Boolean rank = rankNode.getBoolean();

    return rank;
}
 
開發者ID:Aquerr,項目名稱:EagleFactions,代碼行數:9,代碼來源:MainLogic.java

示例14: getCreateByItems

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static boolean getCreateByItems()
{
    ConfigurationNode createByItemsNode = ConfigAccess.getConfig(mainConfig).getNode("eaglefactions", "gameplay", "factioncreation", "createbyitems");

    boolean createByItems = createByItemsNode.getBoolean();

    return createByItems;
}
 
開發者ID:Aquerr,項目名稱:EagleFactions,代碼行數:9,代碼來源:MainLogic.java

示例15: getFactionFriendlyFire

import ninja.leaping.configurate.ConfigurationNode; //導入方法依賴的package包/類
public static boolean getFactionFriendlyFire(String factionName)
{
    ConfigurationNode friendlyFireNode = ConfigAccess.getConfig(factionsConfig).getNode("factions", factionName, "friendlyfire");

    Boolean friendlyFire = friendlyFireNode.getBoolean();

    return friendlyFire;
}
 
開發者ID:Aquerr,項目名稱:EagleFactions,代碼行數:9,代碼來源:FactionLogic.java


注:本文中的ninja.leaping.configurate.ConfigurationNode.getBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。