if( -> if (

This commit is contained in:
nossr50
2024-05-12 14:13:34 -07:00
parent 435a6fde34
commit 291effdbc8
163 changed files with 1116 additions and 1116 deletions

View File

@@ -52,7 +52,7 @@ public abstract class BukkitConfig {
try {
config.save(configFile);
if(copyDefaults && !savedDefaults) {
if (copyDefaults && !savedDefaults) {
copyMissingDefaultsFromResource();
savedDefaults = true;
}
@@ -84,7 +84,7 @@ public abstract class BukkitConfig {
YamlConfiguration saveDefaultConfigToDisk() {
LogUtils.debug(mcMMO.p.getLogger(), "Copying default config to disk: " + fileName + " to defaults/" + fileName);
try(InputStream inputStream = mcMMO.p.getResource(fileName)) {
if(inputStream == null) {
if (inputStream == null) {
mcMMO.p.getLogger().severe("Unable to copy default config: " + fileName);
return null;
}

View File

@@ -73,7 +73,7 @@ public class WorldBlacklist {
closeRead(fileReader);
}
if(blacklist.size() > 0)
if (blacklist.size() > 0)
plugin.getLogger().info(blacklist.size() + " entries in mcMMO World Blacklist");
}

View File

@@ -195,10 +195,10 @@ public class PotionConfig extends LegacyConfigLoader {
PotionUtil.setBasePotionType(potionMeta, potionType, extended, upgraded);
// // Use the name of the potion to indicate upgrade status if not set in PotionData
// if(convertPotionConfigName(key).toUpperCase().contains("STRONG"))
// if (convertPotionConfigName(key).toUpperCase().contains("STRONG"))
// upgraded = true;
//
// if(convertPotionConfigName(key).toUpperCase().contains("LONG"))
// if (convertPotionConfigName(key).toUpperCase().contains("LONG"))
// extended = true;
List<String> lore = new ArrayList<>();

View File

@@ -20,7 +20,7 @@ public class RepairConfigManager {
repairables.addAll(mainRepairConfig.getLoadedRepairables());
for (String fileName : dataFolder.list()) {
if(fileName.equals(REPAIR_VANILLA_YML))
if (fileName.equals(REPAIR_VANILLA_YML))
continue;
if (!pattern.matcher(fileName).matches()) {

View File

@@ -21,7 +21,7 @@ public class SalvageConfigManager {
salvageables.addAll(mainSalvageConfig.getLoadedSalvageables());
for (String fileName : dataFolder.list()) {
if(fileName.equals(SALVAGE_VANILLA_YML))
if (fileName.equals(SALVAGE_VANILLA_YML))
continue;
if (!pattern.matcher(fileName).matches()) {

View File

@@ -50,7 +50,7 @@ public class FishingTreasureConfig extends BukkitConfig {
List<String> reason = new ArrayList<>();
ConfigurationSection enchantment_drop_rates = config.getConfigurationSection("Enchantment_Drop_Rates");
if(enchantment_drop_rates != null) {
if (enchantment_drop_rates != null) {
for (String tier : enchantment_drop_rates.getKeys(false)) {
double totalEnchantDropRate = 0;
double totalItemDropRate = 0;