minor fixes for folia

This commit is contained in:
xGinko 2023-09-12 11:42:26 +02:00
parent dd85eaf013
commit b8e9da7d0f
3 changed files with 3 additions and 3 deletions

View File

@ -30,8 +30,8 @@ import java.util.regex.Pattern;
public final class VillagerOptimizer extends JavaPlugin { public final class VillagerOptimizer extends JavaPlugin {
private static VillagerOptimizer instance; private static VillagerOptimizer instance;
private static HashMap<String, LanguageCache> languageCacheMap;
private static CachedVillagers cachedVillagers; private static CachedVillagers cachedVillagers;
private static HashMap<String, LanguageCache> languageCacheMap;
private static Config config; private static Config config;
private static Logger logger; private static Logger logger;

View File

@ -67,8 +67,8 @@ public class LevelVillagers implements VillagerOptimizerModule, Listener {
if (wVillager.canLevelUp(cooldown)) { if (wVillager.canLevelUp(cooldown)) {
if (wVillager.calculateLevel() > villager.getVillagerLevel()) { if (wVillager.calculateLevel() > villager.getVillagerLevel()) {
villager.getScheduler().run(plugin, enableAI -> { villager.getScheduler().run(plugin, enableAI -> {
villager.setAware(true);
villager.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, (int) (20 + (cooldown / 50L)), 120, false, false)); villager.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, (int) (20 + (cooldown / 50L)), 120, false, false));
villager.setAware(true);
}, null); }, null);
villager.getScheduler().runDelayed(plugin, disableAI -> { villager.getScheduler().runDelayed(plugin, disableAI -> {
villager.setAware(false); villager.setAware(false);

View File

@ -24,7 +24,7 @@ import java.util.logging.Level;
public class VillagerChunkLimit implements VillagerOptimizerModule, Listener { public class VillagerChunkLimit implements VillagerOptimizerModule, Listener {
/* /*
* TODO: expand villager chunk limit with settings for optimized and optimzed. * TODO: expand villager chunk limit with settings for optimized and unoptimized.
* */ * */
private final VillagerOptimizer plugin; private final VillagerOptimizer plugin;