Merge branch 'master' of ssh://184.154.0.242:7999/min/mineplex

This commit is contained in:
Chiss 2014-09-19 18:01:52 +10:00
commit 21c131273e
3 changed files with 7 additions and 22 deletions

View File

@ -44,12 +44,10 @@ public class BridgesSniperStatTracker extends StatTracker<Bridge>
if (player == null)
return;
if (player.getLastDamageCause() instanceof EntityDamageByEntityEvent)
{
EntityDamageByEntityEvent edbee = (EntityDamageByEntityEvent) player.getLastDamageCause();
if (player == killer)
return;
if (edbee.getDamager() instanceof Arrow)
addStat(killer, "Sniper", 1, true, false);
}
if ("Archery".equals(event.GetLog().GetLastDamager().GetLastDamageSource()))
addStat(killer, "Sniper", 1, true, false);
}
}

View File

@ -48,8 +48,7 @@ public class DeathBomberStatTracker extends StatTracker<Game>
if (player == null)
return;
if (player.getLastDamageCause().getCause() == EntityDamageEvent.DamageCause.BLOCK_EXPLOSION
|| player.getLastDamageCause().getCause() == EntityDamageEvent.DamageCause.ENTITY_EXPLOSION)
if ("Explosion".equals(event.GetLog().GetLastDamager().GetLastDamageSource()))
{
Integer count = _killCount.get(killer.getUniqueId());

View File

@ -1,10 +1,8 @@
package nautilus.game.arcade.stats;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import mineplex.core.common.util.UtilPlayer;
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 (player.getLastDamageCause() instanceof EntityDamageByEntityEvent)
{
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);
}
}
if (killer.getLocation().distanceSquared(player.getLocation()) >= 64 * 64)
addStat(killer, "TheLongestShot", 1, false, false);
}
}
}