Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex
This commit is contained in:
commit
21c131273e
@ -44,12 +44,10 @@ public class BridgesSniperStatTracker extends StatTracker<Bridge>
|
|||||||
if (player == null)
|
if (player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (player.getLastDamageCause() instanceof EntityDamageByEntityEvent)
|
if (player == killer)
|
||||||
{
|
return;
|
||||||
EntityDamageByEntityEvent edbee = (EntityDamageByEntityEvent) player.getLastDamageCause();
|
|
||||||
|
|
||||||
if (edbee.getDamager() instanceof Arrow)
|
if ("Archery".equals(event.GetLog().GetLastDamager().GetLastDamageSource()))
|
||||||
addStat(killer, "Sniper", 1, true, false);
|
addStat(killer, "Sniper", 1, true, false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,7 @@ public class DeathBomberStatTracker extends StatTracker<Game>
|
|||||||
if (player == null)
|
if (player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (player.getLastDamageCause().getCause() == EntityDamageEvent.DamageCause.BLOCK_EXPLOSION
|
if ("Explosion".equals(event.GetLog().GetLastDamager().GetLastDamageSource()))
|
||||||
|| player.getLastDamageCause().getCause() == EntityDamageEvent.DamageCause.ENTITY_EXPLOSION)
|
|
||||||
{
|
{
|
||||||
Integer count = _killCount.get(killer.getUniqueId());
|
Integer count = _killCount.get(killer.getUniqueId());
|
||||||
|
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
package nautilus.game.arcade.stats;
|
package nautilus.game.arcade.stats;
|
||||||
|
|
||||||
import org.bukkit.entity.Arrow;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||||
@ -45,18 +43,8 @@ public class TheLongestShotStatTracker extends StatTracker<Game>
|
|||||||
|
|
||||||
if (event.GetLog().GetLastDamager().GetReason() != null && event.GetLog().GetLastDamager().GetReason().contains("Longshot"))
|
if (event.GetLog().GetLastDamager().GetReason() != null && event.GetLog().GetLastDamager().GetReason().contains("Longshot"))
|
||||||
{
|
{
|
||||||
if (player.getLastDamageCause() instanceof EntityDamageByEntityEvent)
|
if (killer.getLocation().distanceSquared(player.getLocation()) >= 64 * 64)
|
||||||
{
|
addStat(killer, "TheLongestShot", 1, false, false);
|
||||||
EntityDamageByEntityEvent edbee = (EntityDamageByEntityEvent) player.getLastDamageCause();
|
|
||||||
|
|
||||||
if (edbee.getDamager() instanceof Arrow)
|
|
||||||
{
|
|
||||||
Arrow arrow = (Arrow) edbee.getDamager();
|
|
||||||
|
|
||||||
if (arrow.getShooter() == killer && killer.getLocation().distanceSquared(player.getLocation()) >= 64 * 64)
|
|
||||||
addStat(killer, "TheLongestShot", 1, false, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user