Anti-Cheat Compatability, finishing polish

This commit is contained in:
ASangarin 2020-10-14 00:30:17 +02:00
parent b53a6c96bd
commit 15abd09acd

View File

@ -56,7 +56,7 @@ public class MythicMobSkill extends Skill {
if (config.isConfigurationSection("disable-anti-cheat")) if (config.isConfigurationSection("disable-anti-cheat"))
for(String key : config.getConfigurationSection("").getKeys(false)) { for(String key : config.getConfigurationSection("").getKeys(false)) {
Optional<CheatType> optional = Enums.getIfPresent(CheatType.class, ""); Optional<CheatType> optional = Enums.getIfPresent(CheatType.class, key.toUpperCase());
if(optional.isPresent() && config.isInt("disable-anti-cheat." + key)) if(optional.isPresent() && config.isInt("disable-anti-cheat." + key))
antiCheat.put(optional.get(), config.getInt("disable-anti-cheat." + key)); antiCheat.put(optional.get(), config.getInt("disable-anti-cheat." + key));
else MMOCore.log(Level.WARNING, "Invalid Anti-Cheat configuration for '" + id + "'!"); else MMOCore.log(Level.WARNING, "Invalid Anti-Cheat configuration for '" + id + "'!");