mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Add mcMMO_Region_System.Enabled to persistent_data.yml (removed from hidden config)
This commit is contained in:
parent
e76fb9ab1b
commit
56f9341f8e
@ -1,4 +1,6 @@
|
||||
Version 2.1.189
|
||||
The setting to disable the mcMMO user block tracker has been moved from our "hidden config" to persistent_data.yml
|
||||
Added 'mcMMO_Region_System.Enabled' to persistent_data.yml (don't touch this setting unless you know what you are doing)
|
||||
Fixed a bug that would remove components from death messages when players were killed by mobs (thanks lexikiq)
|
||||
Removed MHD command (it didn't do anything for a while now)
|
||||
Removed UltraPermissions warning
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.listeners.InteractionManager;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
|
@ -9,7 +9,6 @@ public class HiddenConfig {
|
||||
private static HiddenConfig instance;
|
||||
private final String fileName;
|
||||
private YamlConfiguration config;
|
||||
private boolean chunkletsEnabled;
|
||||
private int conversionRate;
|
||||
private boolean useEnchantmentBuffs;
|
||||
|
||||
@ -30,15 +29,11 @@ public class HiddenConfig {
|
||||
InputStreamReader reader = mcMMO.p.getResourceAsReader(fileName);
|
||||
if (reader != null) {
|
||||
config = YamlConfiguration.loadConfiguration(reader);
|
||||
chunkletsEnabled = config.getBoolean("Options.Chunklets", true);
|
||||
conversionRate = config.getInt("Options.ConversionRate", 1);
|
||||
useEnchantmentBuffs = config.getBoolean("Options.EnchantmentBuffs", true);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getChunkletsEnabled() {
|
||||
return chunkletsEnabled;
|
||||
}
|
||||
|
||||
public int getConversionRate() {
|
||||
return conversionRate;
|
||||
|
@ -34,4 +34,9 @@ public class PersistentDataConfig extends AutoUpdateConfigLoader {
|
||||
return config.getBoolean(key, false);
|
||||
}
|
||||
|
||||
public boolean useBlockTracker() {
|
||||
return config.getBoolean("mcMMO_Region_System.Enabled", true);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.datatypes.skills;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.interfaces.Skill;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.util.text.StringUtils;
|
||||
|
@ -1,18 +1,6 @@
|
||||
package com.gmail.nossr50.datatypes.skills.interfaces;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
import com.gmail.nossr50.util.text.StringUtils;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Skill {
|
||||
/**
|
||||
|
@ -7,11 +7,8 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.ToolType;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
import com.gmail.nossr50.util.EventUtils;
|
||||
import com.gmail.nossr50.util.ItemUtils;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
@ -31,14 +28,12 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.SoundCategory;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class Roll extends AcrobaticsSubSkill {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.gmail.nossr50.events.skills.secondaryabilities;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.interfaces.Skill;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||
import com.gmail.nossr50.events.skills.McMMOPlayerSkillEvent;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
|
@ -36,7 +36,6 @@ import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.conversations.Conversation;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.minecart.PoweredMinecart;
|
||||
|
@ -9,9 +9,7 @@ import com.gmail.nossr50.config.mods.BlockConfigManager;
|
||||
import com.gmail.nossr50.config.mods.EntityConfigManager;
|
||||
import com.gmail.nossr50.config.mods.ToolConfigManager;
|
||||
import com.gmail.nossr50.config.skills.alchemy.PotionConfig;
|
||||
import com.gmail.nossr50.config.skills.repair.RepairConfig;
|
||||
import com.gmail.nossr50.config.skills.repair.RepairConfigManager;
|
||||
import com.gmail.nossr50.config.skills.salvage.SalvageConfig;
|
||||
import com.gmail.nossr50.config.skills.salvage.SalvageConfigManager;
|
||||
import com.gmail.nossr50.config.treasure.FishingTreasureConfig;
|
||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
|
@ -1,9 +1,7 @@
|
||||
package com.gmail.nossr50.skills.alchemy;
|
||||
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.runnables.skills.AlchemyBrewTask;
|
||||
import com.gmail.nossr50.util.skills.RankUtils;
|
||||
import org.bukkit.Location;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -8,7 +8,6 @@ import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
||||
import com.gmail.nossr50.datatypes.skills.interfaces.Skill;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||
import com.gmail.nossr50.events.experience.McMMOPlayerLevelChangeEvent;
|
||||
import com.gmail.nossr50.events.experience.McMMOPlayerLevelDownEvent;
|
||||
|
@ -1,13 +1,12 @@
|
||||
package com.gmail.nossr50.util.blockmeta;
|
||||
|
||||
import com.gmail.nossr50.config.HiddenConfig;
|
||||
import com.gmail.nossr50.config.PersistentDataConfig;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ChunkManagerFactory {
|
||||
public static @NotNull ChunkManager getChunkManager() {
|
||||
HiddenConfig hConfig = HiddenConfig.getInstance();
|
||||
|
||||
if (hConfig.getChunkletsEnabled()) {
|
||||
if (PersistentDataConfig.getInstance().useBlockTracker()) {
|
||||
return new HashChunkManager();
|
||||
}
|
||||
|
||||
|
@ -30,3 +30,8 @@ Persistent_Data:
|
||||
# By default mcMMO gives 0 XP for this type of mob, not adjustable currently
|
||||
PLAYER_TAMED_MOB:
|
||||
Saved_To_Disk: false
|
||||
# When players put down a block we track it, the system used to track player blocks is super efficient and has been coded extremely well
|
||||
# It is never recommended to turn this off as it allows exploits such as player dupes etc
|
||||
# We use our own file system for this outside of NBT which has been programmed to be lightning fast
|
||||
mcMMO_Region_System:
|
||||
Enabled: true
|
@ -1,7 +1,6 @@
|
||||
package com.gmail.nossr50.database;
|
||||
|
||||
import com.gmail.nossr50.TestUtil;
|
||||
import com.gmail.nossr50.config.GeneralConfig;
|
||||
import com.google.common.io.Files;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@ -10,7 +9,6 @@ import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import java.io.*;
|
||||
|
Loading…
Reference in New Issue
Block a user