Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/mineplex
This commit is contained in:
commit
2680edbd85
@ -108,7 +108,7 @@
|
||||
<zipfileset src="../Libraries/httpmime-4.2.jar" />
|
||||
<zipfileset src="../Libraries/gson-2.2.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-logging-1.1.1.jar" />
|
||||
<zipfileset src="../Libraries/commons-io-2.4" />
|
||||
<zipfileset src="../Libraries/commons-io-2.4.jar" />
|
||||
<zipfileset src="../Libraries/commons-codec-1.6.jar" />
|
||||
</jar>
|
||||
<copy file="../bin/Hub.jar" todir="../../Testing/Hub/plugins"/>
|
||||
|
@ -12,7 +12,7 @@ public class ClientCombat
|
||||
private LinkedList<CombatLog> _deaths = new LinkedList<CombatLog>();
|
||||
|
||||
private WeakHashMap<LivingEntity, Long> _lastHurt = new WeakHashMap<LivingEntity, Long>();
|
||||
private long _lastHurtByOther = 0;
|
||||
private WeakHashMap<LivingEntity, Long> _lastHurtBy = new WeakHashMap<LivingEntity, Long>();
|
||||
|
||||
public LinkedList<CombatLog> GetKills()
|
||||
{
|
||||
@ -31,12 +31,18 @@ public class ClientCombat
|
||||
|
||||
public boolean CanBeHurtBy(LivingEntity damager)
|
||||
{
|
||||
if (damager != null)
|
||||
if (damager == null)
|
||||
return true;
|
||||
|
||||
if (System.currentTimeMillis() - _lastHurtByOther > 250)
|
||||
|
||||
if (!_lastHurtBy.containsKey(damager))
|
||||
{
|
||||
_lastHurtByOther = System.currentTimeMillis();
|
||||
_lastHurtBy.put(damager, System.currentTimeMillis());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (System.currentTimeMillis() - _lastHurtBy.get(damager) > 400)
|
||||
{
|
||||
_lastHurtBy.put(damager, System.currentTimeMillis());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,6 @@ public class DamageManager extends MiniPlugin
|
||||
NewDamageEvent(damagee, damager, projectile, event.getCause(), event.getDamage(), true, false, false, null, null, preCancel);
|
||||
|
||||
event.setCancelled(true);
|
||||
System.out.println("Cancelled original");
|
||||
}
|
||||
|
||||
/*
|
||||
@ -332,7 +331,6 @@ public class DamageManager extends MiniPlugin
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println("Applying damage (" + (damage - entityDamagee.lastDamage) + ")");
|
||||
ApplyDamage(entityDamagee, damage - entityDamagee.lastDamage, ignoreArmor);
|
||||
entityDamagee.lastDamage = damage;
|
||||
}
|
||||
@ -341,7 +339,6 @@ public class DamageManager extends MiniPlugin
|
||||
entityDamagee.lastDamage = damage;
|
||||
entityDamagee.ax = entityDamagee.getHealth();
|
||||
//entityDamagee.noDamageTicks = entityDamagee.maxNoDamageTicks;
|
||||
System.out.println("Applying damage (" + (damage - entityDamagee.lastDamage) + ")");
|
||||
ApplyDamage(entityDamagee, damage, ignoreArmor);
|
||||
//entityDamagee.hurtTicks = entityDamagee.aW = 10;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user