mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Fixed weird NoClassDefFound error
This commit is contained in:
parent
06c69b82a0
commit
a5cb56dd6d
@ -238,7 +238,10 @@ public abstract class EcoEnchant extends Enchantment implements Listener, Watche
|
||||
disabledWorldNames.clear();
|
||||
disabledWorldNames.addAll(config.getStrings(EcoEnchants.GENERAL_LOCATION + "disabled-in-worlds"));
|
||||
disabledWorlds.clear();
|
||||
List<String> worldNames = Bukkit.getWorlds().stream().map(World::getName).map(String::toLowerCase).collect(Collectors.toList());
|
||||
List<String> worldNames = new ArrayList<>();
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
worldNames.add(world.getName().toLowerCase());
|
||||
}
|
||||
List<String> disabledExistingWorldNames = disabledWorldNames.stream().filter(s -> worldNames.contains(s.toLowerCase())).collect(Collectors.toList());
|
||||
disabledWorlds.addAll(Bukkit.getWorlds().stream().filter(world -> disabledExistingWorldNames.contains(world.getName().toLowerCase())).collect(Collectors.toList()));
|
||||
targets.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user