From 8ceffa057fde926377e7db039861091d9fc5f092 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Fri, 9 Oct 2020 13:52:19 +0200 Subject: [PATCH] Fix typo in config --- Minepacks/resources/config.yml | 4 ++-- .../at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Minepacks/resources/config.yml b/Minepacks/resources/config.yml index dc063c0..e0096b6 100644 --- a/Minepacks/resources/config.yml +++ b/Minepacks/resources/config.yml @@ -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 diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java index d077520..1cb91ca 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Config.java @@ -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 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()