SourceCode #3


  • New
  • Task
Open
Assigned to _ForgeUser10502382
  • _ForgeUser8740801 created this issue Feb 4, 2014

    Hi,

    Sorry for my english. It's not my native language.

    I want to correct this :

    @EventHandler
      public void onHorseHurt(EntityDamageEvent e)
      {
            if ((e.getCause() == EntityDamageEvent.DamageCause.ENTITY_EXPLOSION) || ((e.getCause() == EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) && (getConfig().getBoolean("disableHorseExplosionDamage"))))
              e.setCancelled(true);
            else if ((e.getCause() == EntityDamageEvent.DamageCause.DROWNING) && (getConfig().getBoolean("disableHorseDrowningDamage")))
              e.setCancelled(true);
            else if ((e.getCause() == EntityDamageEvent.DamageCause.WITHER) && (getConfig().getBoolean("disableHorseWitherDamage")))
              e.setCancelled(true);
            else if ((e.getCause() == EntityDamageEvent.DamageCause.LAVA) && (getConfig().getBoolean("disableHorseLavaDamage")))
              e.setCancelled(true);
            else if ((e.getCause() == EntityDamageEvent.DamageCause.FIRE) || ((e.getCause() == EntityDamageEvent.DamageCause.FIRE_TICK) && (getConfig().getBoolean("disableHorseFireDamage"))))
              e.setCancelled(true);
        }
      }

    to that :

    @EventHandler
      public void onHorseHurt(EntityDamageEvent e)
      {
        Entity damaged = e.getEntity();
        if ((damaged instanceof Horse)) {
          Horse h = (Horse)e.getEntity();
          if (h.isTamed())
            if ((e.getCause() == EntityDamageEvent.DamageCause.ENTITY_EXPLOSION) || ((e.getCause() == EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) && (getConfig().getBoolean("disableHorseExplosionDamage"))))
              e.setCancelled(true);
            else if ((e.getCause() == EntityDamageEvent.DamageCause.DROWNING) && (getConfig().getBoolean("disableHorseDrowningDamage")))
              e.setCancelled(true);
            else if ((e.getCause() == EntityDamageEvent.DamageCause.WITHER) && (getConfig().getBoolean("disableHorseWitherDamage")))
              e.setCancelled(true);
            else if ((e.getCause() == EntityDamageEvent.DamageCause.LAVA) && (getConfig().getBoolean("disableHorseLavaDamage")))
              e.setCancelled(true);
            else if ((e.getCause() == EntityDamageEvent.DamageCause.FIRE) || ((e.getCause() == EntityDamageEvent.DamageCause.FIRE_TICK) && (getConfig().getBoolean("disableHorseFireDamage"))))
              e.setCancelled(true);
        }
      }

    I see your plugin don't have update since August. Can i have access to the plugin for maintain it ?

    because : "everyone can safely update there plugins and we all can be happy".

    Thank you for reading... have a good day.

  • _ForgeUser8740801 added the tags New Task Feb 4, 2014

To post a comment, please login or register a new account.