Java Code Examples for org.bukkit.configuration.Configuration#getBoolean()
The following examples show how to use
org.bukkit.configuration.Configuration#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: PacketsModule.java From ExploitFixer with GNU General Public License v3.0 | 7 votes |
final public void reload(final Configuration configYml) { final ConfigurationSection configurationSection = configYml.getConfigurationSection("packets.multipliers"); final String name = "packets"; this.name = "Packets"; this.enabled = configYml.getBoolean(name + ".enabled"); this.cancelVls = configYml.getDouble(name + ".cancel_vls"); this.reduceVls = configYml.getDouble(name + ".reduce_vls"); this.offline = configYml.getBoolean(name + ".offline"); this.dataVls = configYml.getDouble(name + ".data.vls"); this.dataBytes = configYml.getInt(name + ".data.bytes", 24000); this.dataBytesBook = configYml.getInt(name + ".data.bytes_book", 268); this.dataBytesSign = configYml.getInt(name + ".data.bytes_sign", 47); this.dataBytesDivider = configYml.getInt(name + ".data.bytes_divider", 200); this.windowClick = configYml.getDouble(name + ".window_click"); this.blockPlaceVls = configYml.getDouble(name + ".block_place"); this.blockDigVls = configYml.getDouble(name + ".block_dig"); this.setCreativeSlot = configYml.getDouble(name + ".set_creative_slot"); this.violations = new Violations(configYml.getConfigurationSection(name + ".violations")); for (final String key : configurationSection.getKeys(false)) multipliers.put(key, configurationSection.getDouble(key)); }
Example 2
Source File: CustomPayloadModule.java From ExploitFixer with GNU General Public License v3.0 | 6 votes |
public void reload(final Configuration configYml) { final ConfigurationSection configurationSection = configYml .getConfigurationSection("custompayload.multipliers"); final String name = getName().toLowerCase(); this.enabled = configYml.getBoolean(name + ".enabled"); this.cancelVls = configYml.getDouble(name + ".cancel_vls"); this.reduceVls = configYml.getDouble(name + ".reduce_vls"); this.bookVls = configYml.getDouble(name + ".book.vls"); this.bookBytes = configYml.getInt(name + ".book.bytes"); this.violations = new Violations(configYml.getConfigurationSection(name + ".violations")); this.channelVls = configYml.getDouble(name + ".channel.vls"); this.channelAmount = configYml.getInt(name + ".channel.amount"); this.dataVls = configYml.getDouble(name + ".data.vls"); this.dataBytes = configYml.getInt(name + ".data.bytes"); this.tagVls = configYml.getDouble(name + ".tag.vls"); for (final String key : configurationSection.getKeys(false)) { multipliers.put(key, configurationSection.getDouble(key)); } }
Example 3
Source File: ItemsFixModule.java From ExploitFixer with GNU General Public License v3.0 | 5 votes |
final public void reload(final Configuration configYml) { final String name = getName().toLowerCase(); this.enabled = configYml.getBoolean(name + ".enabled", true); this.enchantLimit = configYml.getInt(name + ".enchant_limit", 10); this.maxStackSize = configYml.getInt(name + ".max_stack_size", 64); this.blacklist = new HashSet<>(configYml.getStringList(name + ".blacklist")); }
Example 4
Source File: NPCEntity.java From EliteMobs with GNU General Public License v3.0 | 5 votes |
/** * Spawns NPC based off of the values in the NPCConfig config file. Runs at startup and on reload. * * @param key Name of the config key for this NPC */ public NPCEntity(String key) { this.key = key; key += "."; Configuration configuration = ConfigValues.npcConfig; if (!setSpawnLocation(configuration.getString(key + NPCConfig.LOCATION))) return; if (!configuration.getBoolean(key + NPCConfig.ENABLED)) return; this.villager = (Villager) spawnLocation.getWorld().spawnEntity(spawnLocation, EntityType.VILLAGER); this.villager.setRemoveWhenFarAway(true); setName(configuration.getString(key + NPCConfig.NAME)); initializeRole(configuration.getString(key + NPCConfig.ROLE)); setProfession(configuration.getString(key + NPCConfig.TYPE)); setGreetings(configuration.getStringList(key + NPCConfig.GREETINGS)); setDialog(configuration.getStringList(key + NPCConfig.DIALOG)); setFarewell(configuration.getStringList(key + NPCConfig.FAREWELL)); setCanMove(configuration.getBoolean(key + NPCConfig.CAN_MOVE)); setCanTalk(configuration.getBoolean(key + NPCConfig.CAN_TALK)); setActivationRadius(configuration.getDouble(key + NPCConfig.ACTIVATION_RADIUS)); setDisappearsAtNight(configuration.getBoolean(key + NPCConfig.DISAPPEARS_AT_NIGHT)); setNpcInteractionType(configuration.getString(key + NPCConfig.INTERACTION_TYPE)); EntityTracker.registerNPCEntity(this); addNPCEntity(this); }
Example 5
Source File: NotificationsModule.java From ExploitFixer with GNU General Public License v3.0 | 4 votes |
public void reload(final Configuration configYml) { this.enabled = configYml.getBoolean("notifications.enabled"); this.debug = configYml.getBoolean("notifications.debug"); this.message = ChatColor.translateAlternateColorCodes('&', configYml.getString("notifications.message")); }
Example 6
Source File: Config.java From ProjectAres with GNU Affero General Public License v3.0 | 4 votes |
public void load(Configuration config) throws InvalidConfigurationException { this.enabled = config.getBoolean("player-list.enabled", true); this.playersSeeObservers = config.getBoolean("player-list.players-see-observers", true); this.datacenter = config.getString("player-list.datacenter", null); this.server = config.getString("player-list.server", null); }
Example 7
Source File: ItemQualityColorizer.java From EliteMobs with GNU General Public License v3.0 | 3 votes |
private static int enchantMaxValueGetter(String boolString) { Configuration configuration = ConfigValues.itemsProceduralSettingsConfig; if (configuration.getBoolean(boolString)) { return 1; } return 0; }
Example 8
Source File: ItemQualityColorizer.java From EliteMobs with GNU General Public License v3.0 | 3 votes |
private static int enchantMaxValueGetter(String boolString, String maxLevelString) { Configuration configuration = ConfigValues.itemsProceduralSettingsConfig; if (configuration.getBoolean(boolString)) { return configuration.getInt(maxLevelString); } return 0; }