This commit is contained in:
xGinko 2023-10-03 01:52:46 +02:00
parent b7ba976f77
commit 44e1ef4602
2 changed files with 5 additions and 5 deletions

View File

@ -91,7 +91,7 @@ public class VillagerChunkLimit implements VillagerOptimizerModule, Listener, Ru
private void onCreatureSpawn(CreatureSpawnEvent event) {
Entity spawned = event.getEntity();
if (spawned.getType().equals(EntityType.VILLAGER)) {
checkVillagersInChunk(spawned.getChunk());
this.checkVillagersInChunk(spawned.getChunk());
}
}
@ -99,7 +99,7 @@ public class VillagerChunkLimit implements VillagerOptimizerModule, Listener, Ru
private void onInteract(PlayerInteractEntityEvent event) {
Entity clicked = event.getRightClicked();
if (clicked.getType().equals(EntityType.VILLAGER)) {
checkVillagersInChunk(clicked.getChunk());
this.checkVillagersInChunk(clicked.getChunk());
}
}

View File

@ -76,7 +76,7 @@ public class VillagerChunkLimit implements VillagerOptimizerModule, Listener {
for (World world : server.getWorlds()) {
for (Chunk chunk : world.getLoadedChunks()) {
plugin.getServer().getRegionScheduler().run(
plugin, world, chunk.getX(), chunk.getZ(), check_chunk -> checkVillagersInChunk(chunk)
plugin, world, chunk.getX(), chunk.getZ(), check_chunk -> this.checkVillagersInChunk(chunk)
);
}
}
@ -98,7 +98,7 @@ public class VillagerChunkLimit implements VillagerOptimizerModule, Listener {
private void onCreatureSpawn(CreatureSpawnEvent event) {
Entity spawned = event.getEntity();
if (spawned.getType().equals(EntityType.VILLAGER)) {
checkVillagersInChunk(spawned.getChunk());
this.checkVillagersInChunk(spawned.getChunk());
}
}
@ -106,7 +106,7 @@ public class VillagerChunkLimit implements VillagerOptimizerModule, Listener {
private void onInteract(PlayerInteractEntityEvent event) {
Entity clicked = event.getRightClicked();
if (clicked.getType().equals(EntityType.VILLAGER)) {
checkVillagersInChunk(clicked.getChunk());
this.checkVillagersInChunk(clicked.getChunk());
}
}