From 5df9cfc2d8db0b529552b97b4b59361ddd96f847 Mon Sep 17 00:00:00 2001 From: matsu1213 Date: Thu, 8 Aug 2024 14:48:41 +0900 Subject: [PATCH] debug --- .../java/net/azisaba/leoncsaddon/WeaponPotionListener.java | 4 ++++ 1 file changed, 4 insertions(+) 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);