diff --git a/src/main/java/net/azisaba/leoncsaddon/WeaponPotionListener.java b/src/main/java/net/azisaba/leoncsaddon/WeaponPotionListener.java index c0221fb..245ecf4 100644 --- a/src/main/java/net/azisaba/leoncsaddon/WeaponPotionListener.java +++ b/src/main/java/net/azisaba/leoncsaddon/WeaponPotionListener.java @@ -1,6 +1,7 @@ package net.azisaba.leoncsaddon; import com.shampaggon.crackshot.events.WeaponDamageEntityEvent; +import org.bukkit.Bukkit; import org.bukkit.entity.Arrow; import org.bukkit.entity.Egg; import org.bukkit.entity.Player; @@ -19,7 +20,9 @@ public void onDamage(ProjectileHitEvent e){ if(!(e.getHitEntity() instanceof Player)) return; if(!(e.getEntity().getShooter() instanceof Player)) return; if(!(e.getEntity() instanceof Snowball) && !(e.getEntity() instanceof Egg) && !(e.getEntity() instanceof Arrow)) return; + Bukkit.broadcastMessage("called"); if(!e.getEntity().hasMetadata("projParentNode")) return; + Bukkit.broadcastMessage("hasMetadata"); WeaponConfigData data = LeonCSAddon.INSTANCE.getWeaponConfig().getWeaponConfigData(((MetadataValue)e.getEntity().getMetadata("projParentNode").get(0)).asString()); @@ -30,6 +33,7 @@ public void onDamage(ProjectileHitEvent e){ if(shooter.getScoreboard().getEntryTeam(shooter.getName()) == victimPlayer.getScoreboard().getEntryTeam(e.getHitEntity().getName())){ + Bukkit.broadcastMessage("same team"); for(PotionEffect effect: data.allyPotion){ victimPlayer.removePotionEffect(effect.getType()); victimPlayer.addPotionEffect(effect);