Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 0af0416

Browse files
author
SvenjaReißaus
committed
Custom faction starting balance config in JSON
1 parent ce87004 commit 0af0416

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/main/java/com/massivecraft/factions/Conf.java

+1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ public class Conf {
240240
public static double econCostMap = 0.0;
241241
public static double econCostPower = 0.0;
242242
public static double econCostShow = 0.0;
243+
public static double econFactionStartingBalance = 0.0;
243244

244245

245246
// -------------------------------------------- //

src/main/java/com/massivecraft/factions/cmd/CmdCreate.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public void perform() {
9999
msg(TL.COMMAND_CREATE_YOUSHOULD, p.cmdBase.cmdDescription.getUseageTemplate());
100100

101101
if (Conf.econEnabled) {
102-
Econ.setBalance(faction.getAccountId(), 0);
102+
Econ.setBalance(faction.getAccountId(), Conf.econFactionStartingBalance);
103103
}
104104

105105
if (Conf.logFactionCreate) {

src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ public void onPlayerHomeCheck(PlayerTeleportEvent event) throws Exception {
657657
FPlayer fplayer = FPlayers.getInstance().getByPlayer(player);
658658
User user = SavageFactions.plugin.ess.getUser(event.getPlayer());
659659
List<String> homes = user.getHomes();
660-
if (fac.isWilderness() || FPlayers.getInstance().getByPlayer(event.getPlayer()).getFactionId().equals(fac.getId())) {
660+
if (fac.isWilderness() || fplayer.getFactionId().equals(fac.getId())) {
661661
return;
662662
}
663663
//Warzone and SafeZone Home Initializers

0 commit comments

Comments
 (0)