Small fix

This commit is contained in:
Driftay 2019-06-30 05:22:55 -04:00
parent 1a90bcbb75
commit 6cfc36b50a
3 changed files with 3 additions and 0 deletions

View File

@ -335,6 +335,7 @@ public class Conf {
public static String vaultPrefix = "faction-%s"; public static String vaultPrefix = "faction-%s";
public static int defaultMaxVaults = 0; public static int defaultMaxVaults = 0;
public static boolean useCustomDefaultPermissions = true; public static boolean useCustomDefaultPermissions = true;
public static boolean usePermissionHints = false;
public static Backend backEnd = Backend.JSON; public static Backend backEnd = Backend.JSON;

View File

@ -116,6 +116,7 @@ public class CmdCreate extends FCommand {
this.fme.msg(TL.COMMAND_PAYPALSET_CREATED); this.fme.msg(TL.COMMAND_PAYPALSET_CREATED);
if (Conf.useCustomDefaultPermissions) faction.setDefaultPerms(); if (Conf.useCustomDefaultPermissions) faction.setDefaultPerms();
if (Conf.usePermissionHints) fme.msg(TL.COMMAND_HINT_PERMISSION);
fme.setCooldown("create", System.currentTimeMillis() + (SaberFactions.plugin.getConfig().getInt("fcooldowns.f-create") * 1000)); fme.setCooldown("create", System.currentTimeMillis() + (SaberFactions.plugin.getConfig().getInt("fcooldowns.f-create") * 1000));

View File

@ -707,6 +707,7 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator {
} }
public void setDefaultPerms() { public void setDefaultPerms() {
if (!Conf.useCustomDefaultPermissions) return;
Map<PermissableAction, Access> defaultMap = new HashMap<>(); Map<PermissableAction, Access> defaultMap = new HashMap<>();
for (PermissableAction permissableAction : PermissableAction.values()) { for (PermissableAction permissableAction : PermissableAction.values()) {
defaultMap.put(permissableAction, Access.UNDEFINED); defaultMap.put(permissableAction, Access.UNDEFINED);