Config Reload of cached lists

This commit is contained in:
Jascha Starke 2013-12-09 22:14:17 +01:00
parent 8c9be4f1f4
commit 8a76616969
4 changed files with 15 additions and 8 deletions

View file

@ -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());
}

View file

@ -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.");
}
}

View file

@ -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<IModule> 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());
}
@ -70,8 +73,6 @@ public class CmdBlockerConfig extends Configuration implements IConfigurationSub
return config.getBoolean("enabled", true);
}
private CmdBlockList blockList;
/**
* CmdBlockerList
*

View file

@ -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<IModule> 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
*