From 8a76616969a87cc8f508653fbeac6cb28fa29bc7 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Mon, 9 Dec 2013 22:14:17 +0100 Subject: [PATCH] Config Reload of cached lists --- .../blockstate/BlockStateConfig.java | 1 + .../limitedcreative/blockstate/DBQueries.java | 2 +- .../cmdblocker/CmdBlockerConfig.java | 5 +++-- .../limitedcreative/limits/LimitConfig.java | 15 ++++++++++----- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateConfig.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateConfig.java index 058fbe8..0098357 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateConfig.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/BlockStateConfig.java @@ -55,6 +55,7 @@ public class BlockStateConfig extends Configuration implements IConfigurationSub @Override public void setValues(ConfigurationSection sect) { + ignoredWorlds = null; super.setValues(sect); entry.setDefaultEnabled(getEnabled()); } diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/DBQueries.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/DBQueries.java index 3826c71..2c6f416 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/DBQueries.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/DBQueries.java @@ -298,7 +298,7 @@ public class DBQueries { } break; default: - throw new RuntimeException("Currently only SQLite is supported."); + throw new RuntimeException("Currently only SQLite or MySQL is supported."); } } diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/cmdblocker/CmdBlockerConfig.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/cmdblocker/CmdBlockerConfig.java index e059d4f..1135ff2 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/cmdblocker/CmdBlockerConfig.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/cmdblocker/CmdBlockerConfig.java @@ -23,6 +23,8 @@ import de.jaschastarke.modularize.ModuleEntry; @ArchiveDocComments @PluginConfigurations(parent = Config.class) public class CmdBlockerConfig extends Configuration implements IConfigurationSubGroup { + private CmdBlockList blockList; + protected ModCmdBlocker mod; protected ModuleEntry entry; @@ -37,6 +39,7 @@ public class CmdBlockerConfig extends Configuration implements IConfigurationSub @Override public void setValues(ConfigurationSection sect) { + blockList = null; super.setValues(sect); entry.setDefaultEnabled(getEnabled()); } @@ -69,8 +72,6 @@ public class CmdBlockerConfig extends Configuration implements IConfigurationSub public boolean getEnabled() { return config.getBoolean("enabled", true); } - - private CmdBlockList blockList; /** * CmdBlockerList diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/LimitConfig.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/LimitConfig.java index 3b43d50..be75db9 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/LimitConfig.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/limits/LimitConfig.java @@ -26,6 +26,11 @@ import de.jaschastarke.modularize.ModuleEntry; @ArchiveDocComments @PluginConfigurations(parent = Config.class) public class LimitConfig extends Configuration implements IConfigurationSubGroup { + private BlackList breakList; + private BlackListEntity interactEntityList; + private BlackList interactList; + private BlackList useList; + protected ModCreativeLimits mod; protected ModuleEntry entry; @@ -49,6 +54,10 @@ public class LimitConfig extends Configuration implements IConfigurationSubGroup @Override public void setValues(ConfigurationSection sect) { + breakList = null; + interactEntityList = null; + interactList = null; + useList = null; super.setValues(sect); entry.setDefaultEnabled(getEnabled()); @@ -159,8 +168,6 @@ public class LimitConfig extends Configuration implements IConfigurationSubGroup return getEnum(BlockPickup.class, "pickup", BlockPickup.PREVENT); } - - private BlackList interactList; /** * LimitInteraction * @@ -189,7 +196,7 @@ public class LimitConfig extends Configuration implements IConfigurationSubGroup } return interactList; } - private BlackListEntity interactEntityList; + /** * LimitEntityInteraction * @@ -212,7 +219,6 @@ public class LimitConfig extends Configuration implements IConfigurationSubGroup return interactEntityList; } - private BlackList useList; /** * LimitUse * @@ -241,7 +247,6 @@ public class LimitConfig extends Configuration implements IConfigurationSubGroup return useList; } - private BlackList breakList; /** * LimitBreak *