Factions/src/com/massivecraft/factions/mixin/PowerMixin.java

47 lines
1.1 KiB
Java
Raw Normal View History

package com.massivecraft.factions.mixin;
2017-02-10 18:34:42 +01:00
import com.massivecraft.factions.entity.MConf;
import com.massivecraft.factions.entity.MPlayer;
2017-02-10 18:34:42 +01:00
import com.massivecraft.massivecore.mixin.Mixin;
2017-02-10 18:34:42 +01:00
public class PowerMixin extends Mixin
{
2017-02-10 18:34:42 +01:00
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static PowerMixin d = new PowerMixin();
private static PowerMixin i = d;
public static PowerMixin get() { return i; }
// -------------------------------------------- //
// METHODS
// -------------------------------------------- //
public double getMaxUniversal(MPlayer mplayer)
{
return this.getMax(mplayer);
}
public double getMax(MPlayer mplayer)
{
return MConf.get().powerMax + mplayer.getPowerBoost();
}
public double getMin(MPlayer mplayer)
{
return MConf.get().powerMin;
}
public double getPerHour(MPlayer mplayer)
{
return MConf.get().powerPerHour;
}
public double getPerDeath(MPlayer mplayer)
{
return MConf.get().powerPerDeath;
}
}