Custom faction starting balance config in JSON

This commit is contained in:
SvenjaReißaus 2019-03-14 08:56:09 -05:00
parent ce87004ae6
commit 0af0416235
No known key found for this signature in database
GPG Key ID: B14150951DBF6D29
3 changed files with 3 additions and 2 deletions

View File

@ -240,6 +240,7 @@ public class Conf {
public static double econCostMap = 0.0;
public static double econCostPower = 0.0;
public static double econCostShow = 0.0;
public static double econFactionStartingBalance = 0.0;
// -------------------------------------------- //

View File

@ -99,7 +99,7 @@ public class CmdCreate extends FCommand {
msg(TL.COMMAND_CREATE_YOUSHOULD, p.cmdBase.cmdDescription.getUseageTemplate());
if (Conf.econEnabled) {
Econ.setBalance(faction.getAccountId(), 0);
Econ.setBalance(faction.getAccountId(), Conf.econFactionStartingBalance);
}
if (Conf.logFactionCreate) {

View File

@ -657,7 +657,7 @@ public class FactionsPlayerListener implements Listener {
FPlayer fplayer = FPlayers.getInstance().getByPlayer(player);
User user = SavageFactions.plugin.ess.getUser(event.getPlayer());
List<String> homes = user.getHomes();
if (fac.isWilderness() || FPlayers.getInstance().getByPlayer(event.getPlayer()).getFactionId().equals(fac.getId())) {
if (fac.isWilderness() || fplayer.getFactionId().equals(fac.getId())) {
return;
}
//Warzone and SafeZone Home Initializers