Fix typo in config

This commit is contained in:
GeorgH93 2020-10-09 13:52:19 +02:00
parent 6f14ba608f
commit 8ceffa057f
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8
2 changed files with 4 additions and 3 deletions

View File

@ -117,12 +117,12 @@ Database:
# Settings controlling the cache behavior of the plugin. You may optimize it a little depending on your player count, ram or cpu bottlenecks.
Cache:
UnCache:
# The strategie used to uncache offline players. Options
# The strategy used to uncache offline players. Options
# interval (offline players get uncached every x seconds)
# intervalChecked (like interval, but also ensures that the player is already offline for at least the interval time, adds a cpu overhead)
# ondisconnect (player instantly gets uncached as soon as he disconnects, may adds overhead if other plugins try to access the player data when they go offline, also it may be problematic for players with unstable connections)
# ondisconnectdelayed (player gets uncached x seconds after he went offline, adds overhead on disconnect, you shouldn't use this with a lot of players joining and leaving.)
Strategie: interval
Strategy: interval
# Used for the interval based uncaching algorithms, and is also used as delay for ondisconnectdelayed. Value in seconds. Default: 600 = 10 minutes
Interval: 600
Delay: 600

View File

@ -69,6 +69,7 @@ protected void doUpgrade(@NotNull YamlFileManager oldConfig)
remappedKeys.put("WorldSettings.FilteredWorlds", "WorldSettings.Blacklist");
remappedKeys.put("WorldSettings.BockMode", "WorldSettings.BlacklistMode");
}
if(oldConfig.getVersion() <= 34) remappedKeys.put("Database.Cache.UnCache.Strategy", "Database.Cache.UnCache.Strategie");
Collection<String> keysToKeep = oldConfig.getYamlE().getKeysFiltered("Database\\.SQL\\.(MaxLifetime|IdleTimeout)");
keysToKeep.addAll(oldConfig.getYamlE().getKeysFiltered("Database\\.Tables\\.Fields\\..+"));
doUpgrade(oldConfig, remappedKeys, keysToKeep);
@ -142,7 +143,7 @@ public boolean getUseUUIDSeparators()
public String getUnCacheStrategie()
{
return getConfigE().getString("Database.Cache.UnCache.Strategie", "interval").toLowerCase(Locale.ENGLISH);
return getConfigE().getString("Database.Cache.UnCache.Strategy", "interval").toLowerCase(Locale.ENGLISH);
}
public long getUnCacheInterval()