Fixed some achievement bugs
This commit is contained in:
parent
8b14c85572
commit
8cb836d5b3
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user