NoEndermanInBrightArea

NoEndermanInBrightArea

Stops enderman from spawning in bright area

30 downloads

This plugin stops enderman from spawning in bright area by just cancel the spawn event if the block light level is not zero.

@EventHandler
public void onCreatureSpawn(CreatureSpawnEvent event) {
  if (event.getEntityType() != EntityType.ENDERMAN) return;
  if (event.getLocation().getWorld().getBlockAt(event.getLocation()).getLightFromBlocks() == 0) return;
  
  event.setCancelled(true);
}

No gallery available for this project.