&& 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);
}
}