mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-14 22:56:10 +01:00
Don't enable performance tweaks if server version is not supported
This commit is contained in:
parent
3124a708cc
commit
bdf5b54975
@ -134,6 +134,7 @@ public enum DMessages implements Messages {
|
||||
GROUP_KICKED_PLAYER("Group_KickedPlayer", "&4&v1&6 kicked the player &4&v2&6 from the group &4&v3&6."),
|
||||
GROUP_PLAYER_JOINED("Group_PlayerJoined", "&6Player &4&v1&6 has joined the group!"),
|
||||
GROUP_WAVE_FINISHED("Group_WaveFinished", "&6Your group finished wave no. &4&v1&6. The next one is going to start in &4&v2&6 seconds."),
|
||||
LOG_DISABLED_TWEAKS("Log_DisabledTweaks", "&4Disabled performance tweaks because there is no support for this server software."),
|
||||
LOG_ERROR_MOB_ENCHANTMENT("Log_Error_MobEnchantment", "&4Error at loading mob.yml: Enchantment &6&v1&4 doesn't exist!"),
|
||||
LOG_ERROR_MOBTYPE("Log_Error_MobType", "&4Error at loading mob.yml: Mob &6&v1&4 doesn't exist!"),
|
||||
LOG_ERROR_NO_CONSOLE_COMMAND("Log_Error_NoConsoleCommand", "&6/dxl &v1&4 can not be executed as console!"),
|
||||
|
@ -16,8 +16,11 @@
|
||||
*/
|
||||
package io.github.dre2n.dungeonsxl.config;
|
||||
|
||||
import io.github.dre2n.commons.compatibility.CompatibilityHandler;
|
||||
import io.github.dre2n.commons.compatibility.Internals;
|
||||
import io.github.dre2n.commons.config.BRConfig;
|
||||
import io.github.dre2n.commons.util.EnumUtil;
|
||||
import io.github.dre2n.commons.util.messageutil.MessageUtil;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -496,7 +499,12 @@ public class MainConfig extends BRConfig {
|
||||
}
|
||||
|
||||
if (config.contains("tweaksEnabled")) {
|
||||
tweaksEnabled = config.getBoolean("tweaksEnabled");
|
||||
if (Internals.andHigher(Internals.v1_9_R1).contains(CompatibilityHandler.getInstance().getInternals())) {
|
||||
tweaksEnabled = config.getBoolean("tweaksEnabled");
|
||||
} else {
|
||||
tweaksEnabled = false;
|
||||
MessageUtil.log(DMessages.LOG_DISABLED_TWEAKS.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if (config.contains("secureMode.enabled")) {
|
||||
|
Loading…
Reference in New Issue
Block a user