Java Code Examples for ninja.leaping.configurate.commented.CommentedConfigurationNode#getBoolean()
The following examples show how to use
ninja.leaping.configurate.commented.CommentedConfigurationNode#getBoolean() .
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: Utils.java From EssentialCmds with MIT License | 5 votes |
public static boolean areBlacklistMsgsEnabled() { CommentedConfigurationNode node = Configs.getConfig(mainConfig).getNode("blacklist", "messages"); if (node.getValue() != null) return node.getBoolean(); else Configs.setValue(mainConfig, node.getPath(), true); return true; }
Example 2
Source File: Utils.java From EssentialCmds with MIT License | 5 votes |
public static boolean isTeleportCooldownEnabled() { CommentedConfigurationNode node = Configs.getConfig(mainConfig).getNode("teleport", "cooldown", "enabled"); if (node.getValue() != null) return node.getBoolean(); else Utils.setTeleportCooldownEnabled(false); return false; }
Example 3
Source File: Utils.java From EssentialCmds with MIT License | 5 votes |
public static boolean useMySQL() { CommentedConfigurationNode node = Configs.getConfig(mainConfig).getNode("mysql", "use"); if (configManager.getBoolean(node).isPresent()) return node.getBoolean(); setUseMySQL(false); return false; }
Example 4
Source File: Utils.java From EssentialCmds with MIT License | 5 votes |
public static boolean unsafeEnchanmentsEnabled() { CommentedConfigurationNode node = Configs.getConfig(mainConfig).getNode("unsafeenchantments", "enabled"); if (configManager.getBoolean(node).isPresent()) return node.getBoolean(); setUnsafeEnchanmentsEnabled(false); return false; }
Example 5
Source File: Utils.java From EssentialCmds with MIT License | 5 votes |
public static boolean isPlayerCommandLoggingEnabled() { CommentedConfigurationNode valueNode = Configs.getConfig(mainConfig).getNode("log", "command", "player"); if (valueNode.getValue() != null) { return valueNode.getBoolean(); } else { Configs.setValue(mainConfig, valueNode.getPath(), true); return true; } }
Example 6
Source File: Utils.java From EssentialCmds with MIT License | 5 votes |
public static boolean isConsoleCommandLoggingEnabled() { CommentedConfigurationNode valueNode = Configs.getConfig(mainConfig).getNode("log", "command", "console"); if (valueNode.getValue() != null) { return valueNode.getBoolean(); } else { Configs.setValue(mainConfig, valueNode.getPath(), true); return true; } }
Example 7
Source File: Utils.java From EssentialCmds with MIT License | 5 votes |
public static boolean isCommandBlockCommandLoggingEnabled() { CommentedConfigurationNode valueNode = Configs.getConfig(mainConfig).getNode("log", "command", "command-block"); if (valueNode.getValue() != null) { return valueNode.getBoolean(); } else { Configs.setValue(mainConfig, valueNode.getPath(), true); return true; } }
Example 8
Source File: Utils.java From EssentialCmds with MIT License | 5 votes |
public static boolean isOtherCommandLoggingEnabled() { CommentedConfigurationNode valueNode = Configs.getConfig(mainConfig).getNode("log", "command", "other"); if (valueNode.getValue() != null) { return valueNode.getBoolean(); } else { Configs.setValue(mainConfig, valueNode.getPath(), true); return true; } }