diff --git a/mvn-repo/com/massivecraft/Factions/1.6.9.5-U0.2.1-RC-1.5-BETA/Factions-1.6.9.5-U0.2.1-RC-1.5-BETA.pom b/mvn-repo/com/massivecraft/Factions/1.6.9.5-U0.2.1-RC-1.5-BETA/Factions-1.6.9.5-U0.2.1-RC-1.5-BETA.pom index 3563b23f..5cb942e7 100644 --- a/mvn-repo/com/massivecraft/Factions/1.6.9.5-U0.2.1-RC-1.5-BETA/Factions-1.6.9.5-U0.2.1-RC-1.5-BETA.pom +++ b/mvn-repo/com/massivecraft/Factions/1.6.9.5-U0.2.1-RC-1.5-BETA/Factions-1.6.9.5-U0.2.1-RC-1.5-BETA.pom @@ -365,10 +365,6 @@ mvdw-software http://repo.mvdw-software.be/content/groups/public/ - - ProSavage - https://www.myget.org/F/prosavage/maven/ - diff --git a/src/main/java/com/massivecraft/factions/Conf.java b/src/main/java/com/massivecraft/factions/Conf.java index e0a3b108..7ead60d8 100644 --- a/src/main/java/com/massivecraft/factions/Conf.java +++ b/src/main/java/com/massivecraft/factions/Conf.java @@ -221,7 +221,7 @@ public class Conf { /// This defines a set of materials which should always be allowed to use, regardless of factions permissions. /// Useful for HCF features. /// - public static Set territoryBypasssProtectedMaterials = EnumSet.noneOf(Material.class); + public static Set territoryBypassProtectedMaterials = EnumSet.noneOf(Material.class); // Economy settings public static boolean econEnabled = false; @@ -325,6 +325,7 @@ public class Conf { // mainly for other plugins/mods that use a fake player to take actions, which shouldn't be subject to our protections public static Set playersWhoBypassAllProtection = new LinkedHashSet<>(); + public static boolean useWorldConfigurationsAsWhitelist = false; public static Set worldsNoClaiming = new LinkedHashSet<>(); public static Set worldsNoPowerLoss = new LinkedHashSet<>(); public static Set worldsIgnorePvP = new LinkedHashSet<>(); @@ -343,9 +344,7 @@ public class Conf { // Default Options - Is this even shown on the Conf.json? - public static boolean useCustomDefaultPermissions = false; - public static boolean usePermissionHints = false; - public static HashMap defaultFactionPermissions = new HashMap<>(); + public static transient HashMap defaultFactionPermissions = new HashMap<>(); // Custom Ranks - Oof I forgot I was doing this _SvenjaReissaus_ //public static boolean enableCustomRanks = false; // We will disable it by default to avoid any migration error //public static int maxCustomRanks = 2; // Setting this to -1 will allow unlimited custom ranks @@ -369,7 +368,7 @@ public class Conf { territoryProtectedMaterials.add(Material.BEACON); // Config is not loading if value is empty ??? - territoryBypasssProtectedMaterials.add(Material.COOKIE); + territoryBypassProtectedMaterials.add(Material.COOKIE); territoryDenyUseageMaterials.add(SaberFactions.plugin.FIREBALL); territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java b/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java index 25c5956b..fc364a04 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java @@ -117,11 +117,6 @@ public class CmdCreate extends FCommand { fme.setCooldown("create", System.currentTimeMillis() + (SaberFactions.plugin.getConfig().getInt("fcooldowns.f-create") * 1000)); - if (Conf.useCustomDefaultPermissions) { - faction.setDefaultPerms(); - if (Conf.usePermissionHints) - this.fme.msg(TL.COMMAND_HINT_PERMISSION); - } } @Override diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdDisband.java b/src/main/java/com/massivecraft/factions/cmd/CmdDisband.java index f18c74f9..b815cba2 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdDisband.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdDisband.java @@ -65,7 +65,7 @@ public class CmdDisband extends FCommand { } - if (!fme.isAdminBypassing()) { + if (fme != null && !fme.isAdminBypassing()) { Access access = faction.getAccess(fme, PermissableAction.DISBAND); if (fme.getRole() != Role.LEADER && faction.getFPlayerLeader() != fme && access != Access.ALLOW) { fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "disband " + faction.getTag()); @@ -84,7 +84,7 @@ public class CmdDisband extends FCommand { // check for tnt before disbanding. - if (!disbandMap.containsKey(me.getUniqueId().toString()) && faction.getTnt() > 0) { + if ((fme!= null && !disbandMap.containsKey(me.getUniqueId().toString())) && faction.getTnt() > 0) { msg(TL.COMMAND_DISBAND_CONFIRM.toString().replace("{tnt}", faction.getTnt() + "")); disbandMap.put(me.getUniqueId().toString(), faction.getId()); Bukkit.getScheduler().scheduleSyncDelayedTask(SaberFactions.plugin, () -> disbandMap.remove(me.getUniqueId().toString()), 200L); diff --git a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java index e578ecfd..e0cdb890 100644 --- a/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/main/java/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -642,8 +642,8 @@ public class FactionsPlayerListener implements Listener { Block block = event.getClickedBlock(); Player player = event.getPlayer(); // Check if the material is bypassing protection - if (Conf.territoryBypasssProtectedMaterials.contains(block.getType())) return; if (block == null) return; // clicked in air, apparently + if (Conf.territoryBypassProtectedMaterials.contains(block.getType())) return; if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) != null) { if (!canPlayerUseBlock(player, block, false)) { event.setCancelled(true); diff --git a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java index 9d4ef8a9..3a91f69a 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java @@ -790,7 +790,7 @@ public abstract class MemoryFPlayer implements FPlayer { error = SaberFactions.plugin.txt.parse(TL.CLAIM_PROTECTED.toString()); } else if (flocation.isOutsideWorldBorder(SaberFactions.plugin.getConfig().getInt("world-border.buffer", 0))) { error = SaberFactions.plugin.txt.parse(TL.CLAIM_OUTSIDEWORLDBORDER.toString()); - } else if (Conf.worldsNoClaiming.contains(flocation.getWorldName())) { + } else if (Conf.useWorldConfigurationsAsWhitelist != Conf.worldsNoClaiming.contains(flocation.getWorldName())) { error = SaberFactions.plugin.txt.parse(TL.CLAIM_DISABLED.toString()); } else if (this.isAdminBypassing()) { return true; diff --git a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFaction.java b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFaction.java index 5555f9ce..8493ce22 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFaction.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFaction.java @@ -707,7 +707,6 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator { } public void setDefaultPerms() { - if (!Conf.useCustomDefaultPermissions) return; Map defaultMap = new HashMap<>(); for (PermissableAction permissableAction : PermissableAction.values()) { defaultMap.put(permissableAction, Access.UNDEFINED); diff --git a/src/main/resources/lang.yml b/src/main/resources/lang.yml index f365d997..1f114c1d 100644 --- a/src/main/resources/lang.yml +++ b/src/main/resources/lang.yml @@ -1,4 +1,4 @@ -# Lang file for SaberFactions by drtshock & ProSavage +# Lang file for SaberFactions by drtshock & Driftay # Use & for color codes. # Made with love <3 diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index fae017ec..34956572 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -4,7 +4,7 @@ api-version: 1.13 main: com.massivecraft.factions.SaberFactions authors: [Olof Larsson, Brett Flannigan, drtshock, ProSavage, SvenjaReißaus, Driftay] softdepend: [Skript, CoreProtect, PlayerVaults, PlaceholderAPI, MVdWPlaceholderAPI, PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, iChat, LocalAreaChat, LWC, nChat, ChatManager, CAPI, AuthMe, Vault, Spout, WorldEdit, WorldGuard, AuthDB, CaptureThePoints, CombatTag, dynmap, FactionsTop] -website: www.prosavage.net + commands: factions: description: Reference command for Factions.