Package us.deathmarine.diablodrops.sets

Examples of us.deathmarine.diablodrops.sets.ArmorSet


        && event.getEntity() instanceof LivingEntity) {
      if (plugin.getSetAPI()
          .wearingSet((LivingEntity) event.getDamager())) {
        String sName = plugin.getSetAPI().getNameOfSet(
            (LivingEntity) event.getDamager());
        ArmorSet aSet = plugin.getSetAPI().getArmorSet(sName);
        if (aSet != null) {
          List<String> effects = aSet.getBonuses();
          for (String s : effects) {
            EffectsAPI.addEffect((LivingEntity) event.getEntity(),
                (LivingEntity) event.getDamager(), s, event);
          }
        }
      }
    } else if (event.getDamager() instanceof Player
        && event.getEntity() instanceof LivingEntity) {
      if (plugin.getSetAPI().wearingSet((Player) event.getDamager())) {
        String sName = plugin.getSetAPI().getNameOfSet(
            (Player) event.getDamager());
        ArmorSet aSet = plugin.getSetAPI().getArmorSet(sName);
        if (aSet != null) {
          List<String> effects = aSet.getBonuses();
          for (String s : effects) {
            EffectsAPI.addEffect((LivingEntity) event.getEntity(),
                (LivingEntity) event.getDamager(), s, event);
          }
        }
      }
    }
    if (event.getEntity() instanceof Monster
        && event.getDamager() instanceof LivingEntity) {
      if (plugin.getSetAPI().wearingSet((LivingEntity) event.getEntity())) {
        String sName = plugin.getSetAPI().getNameOfSet(
            (LivingEntity) event.getEntity());
        ArmorSet aSet = plugin.getSetAPI().getArmorSet(sName);
        if (aSet != null) {
          List<String> effects = aSet.getBonuses();
          for (String s : effects) {
            EffectsAPI.addEffect((LivingEntity) event.getDamager(),
                (LivingEntity) event.getEntity(), s, event);
          }
        }
      }

    } else if (event.getEntity() instanceof Player
        && event.getDamager() instanceof LivingEntity) {
      if (plugin.getSetAPI().wearingSet((Player) event.getEntity())) {
        String sName = plugin.getSetAPI().getNameOfSet(
            (Player) event.getEntity());
        ArmorSet aSet = plugin.getSetAPI().getArmorSet(sName);
        if (aSet != null) {
          List<String> effects = aSet.getBonuses();
          for (String s : effects) {
            EffectsAPI.addEffect((LivingEntity) event.getDamager(),
                (Player) event.getEntity(), s, event);
          }
        }
View Full Code Here


  public void onDiabloMonsterDamageEvent(final EntityDamageEvent event) {
    if (event.getEntity() instanceof Monster) {
      if (plugin.getSetAPI().wearingSet((LivingEntity) event.getEntity())) {
        String sName = plugin.getSetAPI().getNameOfSet(
            (LivingEntity) event.getEntity());
        ArmorSet aSet = plugin.getSetAPI().getArmorSet(sName);
        if (aSet != null) {
          List<String> effects = aSet.getBonuses();
          for (String s : effects) {
            EffectsAPI.addEffect((LivingEntity) event.getEntity(),
                null, s, event);
          }
        }
      }

    } else if (event.getEntity() instanceof Player) {
      if (plugin.getSetAPI().wearingSet((Player) event.getEntity())) {
        String sName = plugin.getSetAPI().getNameOfSet(
            (Player) event.getEntity());
        ArmorSet aSet = plugin.getSetAPI().getArmorSet(sName);
        if (aSet != null) {
          List<String> effects = aSet.getBonuses();
          for (String s : effects) {
            EffectsAPI.addEffect((Player) event.getEntity(), null,
                s, event);
          }
        }
View Full Code Here

    }
    for (String name : cs.getKeys(false)) {
      List<String> bonuses = cs.getStringList(name + ".Bonuses");
      if (bonuses == null)
        bonuses = new ArrayList<String>();
      plugin.armorSets.add(new ArmorSet(name, bonuses));
    }
  }
View Full Code Here

TOP

Related Classes of us.deathmarine.diablodrops.sets.ArmorSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.