Java Code Examples for codechicken.lib.config.ConfigTag#containsTag()
The following examples show how to use
codechicken.lib.config.ConfigTag#containsTag() .
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: ChunkLoaderManager.java From ChickenChunks with MIT License | 5 votes |
public static boolean allowOffline(String username) { ConfigTag config = ChickenChunks.config.getTag("allowoffline"); if (config.containsTag(username)) return config.getTag(username).getBooleanValue(true); if (ServerUtils.isPlayerOP(username)) return config.getTag("OP").getBooleanValue(true); return config.getTag("DEFAULT").getBooleanValue(true); }
Example 2
Source File: ChunkLoaderManager.java From ChickenChunks with MIT License | 5 votes |
public static boolean allowChunkViewer(String username) { ConfigTag config = ChickenChunks.config.getTag("allowchunkviewer"); if (config.containsTag(username)) return config.getTag(username).getBooleanValue(true); if (ServerUtils.isPlayerOP(username)) return config.getTag("OP").getBooleanValue(true); return config.getTag("DEFAULT").getBooleanValue(true); }