mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Config refactoring.
This commit is contained in:
@ -18,7 +18,7 @@ import com.gmail.nossr50.util.Skills;
|
||||
import com.gmail.nossr50.util.Users;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.LoadTreasures;
|
||||
import com.gmail.nossr50.config.TreasuresConfig;
|
||||
import com.gmail.nossr50.config.mods.CustomBlocksConfig;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -59,31 +59,31 @@ public class Excavation {
|
||||
if (Permissions.getInstance().excavationTreasures(player)) {
|
||||
switch (type) {
|
||||
case DIRT:
|
||||
treasures = LoadTreasures.getInstance().excavationFromDirt;
|
||||
treasures = TreasuresConfig.getInstance().excavationFromDirt;
|
||||
break;
|
||||
|
||||
case GRASS:
|
||||
treasures = LoadTreasures.getInstance().excavationFromGrass;
|
||||
treasures = TreasuresConfig.getInstance().excavationFromGrass;
|
||||
break;
|
||||
|
||||
case SAND:
|
||||
treasures = LoadTreasures.getInstance().excavationFromSand;
|
||||
treasures = TreasuresConfig.getInstance().excavationFromSand;
|
||||
break;
|
||||
|
||||
case GRAVEL:
|
||||
treasures = LoadTreasures.getInstance().excavationFromGravel;
|
||||
treasures = TreasuresConfig.getInstance().excavationFromGravel;
|
||||
break;
|
||||
|
||||
case CLAY:
|
||||
treasures = LoadTreasures.getInstance().excavationFromClay;
|
||||
treasures = TreasuresConfig.getInstance().excavationFromClay;
|
||||
break;
|
||||
|
||||
case MYCEL:
|
||||
treasures = LoadTreasures.getInstance().excavationFromMycel;
|
||||
treasures = TreasuresConfig.getInstance().excavationFromMycel;
|
||||
break;
|
||||
|
||||
case SOUL_SAND:
|
||||
treasures = LoadTreasures.getInstance().excavationFromSoulSand;
|
||||
treasures = TreasuresConfig.getInstance().excavationFromSoulSand;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -18,7 +18,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.Wool;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.LoadTreasures;
|
||||
import com.gmail.nossr50.config.TreasuresConfig;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.datatypes.treasure.FishingTreasure;
|
||||
@ -76,23 +76,23 @@ public class Fishing {
|
||||
|
||||
switch (getFishingLootTier(PP)) {
|
||||
case 1:
|
||||
rewards = LoadTreasures.getInstance().fishingRewardsTier1;
|
||||
rewards = TreasuresConfig.getInstance().fishingRewardsTier1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
rewards = LoadTreasures.getInstance().fishingRewardsTier2;
|
||||
rewards = TreasuresConfig.getInstance().fishingRewardsTier2;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
rewards = LoadTreasures.getInstance().fishingRewardsTier3;
|
||||
rewards = TreasuresConfig.getInstance().fishingRewardsTier3;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
rewards = LoadTreasures.getInstance().fishingRewardsTier4;
|
||||
rewards = TreasuresConfig.getInstance().fishingRewardsTier4;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
rewards = LoadTreasures.getInstance().fishingRewardsTier5;
|
||||
rewards = TreasuresConfig.getInstance().fishingRewardsTier5;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -16,8 +16,8 @@ import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.mods.LoadCustomArmor;
|
||||
import com.gmail.nossr50.config.mods.LoadCustomTools;
|
||||
import com.gmail.nossr50.config.mods.CustomArmorConfig;
|
||||
import com.gmail.nossr50.config.mods.CustomToolsConfig;
|
||||
import com.gmail.nossr50.spout.SpoutSounds;
|
||||
import com.gmail.nossr50.util.ItemChecks;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
@ -113,7 +113,7 @@ public class Repair {
|
||||
* REPAIR CUSTOM TOOLS
|
||||
*/
|
||||
else if (ItemChecks.isCustomTool(is) && permInstance.toolRepair(player)) {
|
||||
LoadCustomTools toolsInstance = LoadCustomTools.getInstance();
|
||||
CustomToolsConfig toolsInstance = CustomToolsConfig.getInstance();
|
||||
|
||||
for (CustomItem tool : toolsInstance.customItems) {
|
||||
if (tool.getItemID() == is.getTypeId()) {
|
||||
@ -136,7 +136,7 @@ public class Repair {
|
||||
* REPAIR CUSTOM ARMOR
|
||||
*/
|
||||
else if (ItemChecks.isCustomArmor(is) && permInstance.armorRepair(player)) {
|
||||
LoadCustomArmor armorInstance = LoadCustomArmor.getInstance();
|
||||
CustomArmorConfig armorInstance = CustomArmorConfig.getInstance();
|
||||
|
||||
for (CustomItem armor : armorInstance.customItems) {
|
||||
if (armor.getItemID() == is.getTypeId()) {
|
||||
@ -406,8 +406,8 @@ public class Repair {
|
||||
int materialsRequired = 0;
|
||||
int repairAmount = 0;
|
||||
|
||||
LoadCustomTools toolInstance = LoadCustomTools.getInstance();
|
||||
LoadCustomArmor armorInstance = LoadCustomArmor.getInstance();
|
||||
CustomToolsConfig toolInstance = CustomToolsConfig.getInstance();
|
||||
CustomArmorConfig armorInstance = CustomArmorConfig.getInstance();
|
||||
|
||||
if (ModChecks.getToolFromItemStack(is) != null) {
|
||||
for (CustomItem tool : toolInstance.customItems) {
|
||||
|
Reference in New Issue
Block a user