Fix deprecated warnings related to int vs double damage.
This commit is contained in:
parent
34681c7340
commit
5a7024db4c
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user