Fix deprecated warnings related to int vs double damage.

This commit is contained in:
Olof Larsson 2013-09-15 01:08:20 +02:00
parent 34681c7340
commit 5a7024db4c
2 changed files with 3 additions and 3 deletions

View File

@ -135,10 +135,10 @@ public class UConf extends Entity<UConf>
// -------------------------------------------- // // -------------------------------------------- //
public boolean permanentFactionsDisableLeaderPromotion = false; public boolean permanentFactionsDisableLeaderPromotion = false;
public int actionDeniedPainAmount = 2; public double actionDeniedPainAmount = 2.0D;
public boolean disablePVPForFactionlessPlayers = false; public boolean disablePVPForFactionlessPlayers = false;
public boolean enablePVPAgainstFactionlessInAttackersLand = false; public boolean enablePVPAgainstFactionlessInAttackersLand = false;
public double territoryShieldFactor = 0.3; public double territoryShieldFactor = 0.3D;
// -------------------------------------------- // // -------------------------------------------- //
// DENY COMMANDS // DENY COMMANDS

View File

@ -388,7 +388,7 @@ public class FactionsListenerMain implements Listener
double damage = event.getDamage(); double damage = event.getDamage();
if (damage > 0.0 && udefender.hasFaction() && ownTerritory && uconf.territoryShieldFactor > 0) if (damage > 0.0 && udefender.hasFaction() && ownTerritory && uconf.territoryShieldFactor > 0)
{ {
int newDamage = (int)Math.ceil(damage * (1D - uconf.territoryShieldFactor)); double newDamage = damage * (1D - uconf.territoryShieldFactor);
event.setDamage(newDamage); event.setDamage(newDamage);
// Send message // Send message