Skip to content

Commit

Permalink
Fixes Villager limit
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowZaki committed Jan 9, 2022
1 parent 360ba0b commit fe0e935
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Animals;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
Expand Down Expand Up @@ -109,7 +110,7 @@ public void onCreatureSpawn(final CreatureSpawnEvent e) {
justSpawned.remove(e.getEntity().getUniqueId());
return;
}
if (e.getSpawnReason().equals(SpawnReason.SHOULDER_ENTITY) || e.getSpawnReason().equals(SpawnReason.BREEDING)) {
if (e.getSpawnReason().equals(SpawnReason.SHOULDER_ENTITY) || (!(e.getEntity() instanceof Villager ) && e.getSpawnReason().equals(SpawnReason.BREEDING))) {
// Special case - do nothing - jumping around spawns parrots as they drop off player's shoulder
// Ignore breeding because it's handled in the EntityBreedEvent listener
return;
Expand Down

0 comments on commit fe0e935

Please sign in to comment.