From 1a90bcbb75b62e60966ecd7fe4f8bda017da8b5a Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 30 Jun 2019 05:19:23 -0400 Subject: [PATCH] Default Perms Conf Boolean --- src/main/java/com/massivecraft/factions/Conf.java | 1 + .../com/massivecraft/factions/cmd/CmdCreate.java | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/Conf.java b/src/main/java/com/massivecraft/factions/Conf.java index 7ead60d8..673dc427 100644 --- a/src/main/java/com/massivecraft/factions/Conf.java +++ b/src/main/java/com/massivecraft/factions/Conf.java @@ -334,6 +334,7 @@ public class Conf { // faction- public static String vaultPrefix = "faction-%s"; public static int defaultMaxVaults = 0; + public static boolean useCustomDefaultPermissions = true; public static Backend backEnd = Backend.JSON; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java b/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java index fc364a04..f2833eb2 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java @@ -104,16 +104,19 @@ public class CmdCreate extends FCommand { } msg(TL.COMMAND_CREATE_YOUSHOULD, p.cmdBase.cmdDescription.getUseageTemplate()); - if (Conf.econEnabled) { + if (Conf.econEnabled) Econ.setBalance(faction.getAccountId(), Conf.econFactionStartingBalance); - } - if (Conf.logFactionCreate) { + + + if (Conf.logFactionCreate) SaberFactions.plugin.log(fme.getName() + TL.COMMAND_CREATE_CREATEDLOG.toString() + tag); - } - if (SaberFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) { + + if (SaberFactions.plugin.getConfig().getBoolean("fpaypal.Enabled")) this.fme.msg(TL.COMMAND_PAYPALSET_CREATED); - } + + if (Conf.useCustomDefaultPermissions) faction.setDefaultPerms(); + fme.setCooldown("create", System.currentTimeMillis() + (SaberFactions.plugin.getConfig().getInt("fcooldowns.f-create") * 1000));