Esempio n. 1
0
 @EventHandler
 public void onTarget(EntityTargetEvent event) {
   EntityUtil entity = (EntityUtil) event.getEntity();
   if (entity.checkInVillage()) {
     event.setCancelled(true);
   }
 }
Esempio n. 2
0
  @EventHandler
  public void onMobSpawn(EntitySpawnEvent event) {
    EntityUtil entity = (EntityUtil) event.getEntity();
    if (entity instanceof Player) {

    } else {
      if (entity.checkInVillage()) {
        event.setCancelled(true);
      }
    }
  }