new conf.json option "powerFactionMax" (default 0) for maximum power limit for all factions. If set to anything above 0, factions will have their power capped at this amount. As a result, any players adding power beyond the faction's limit will effectively just be adding a buffer of sorts. (feature added thanks to donation from Magesblood)
This commit is contained in:
@@ -203,6 +203,9 @@ public class Faction {
|
||||
for (FPlayer fplayer : this.getFPlayers()) {
|
||||
ret += fplayer.getPower();
|
||||
}
|
||||
if (Conf.powerFactionMax > 0 && ret > Conf.powerFactionMax) {
|
||||
ret = Conf.powerFactionMax;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -211,6 +214,9 @@ public class Faction {
|
||||
for (FPlayer fplayer : this.getFPlayers()) {
|
||||
ret += fplayer.getPowerMax();
|
||||
}
|
||||
if (Conf.powerFactionMax > 0 && ret > Conf.powerFactionMax) {
|
||||
ret = Conf.powerFactionMax;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user