From 206914247d96793032051ceba6fdb4974e207f91 Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 29 Sep 2019 06:44:45 -0400 Subject: [PATCH 01/13] Version Change --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1f2a77ae..60892eef 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.massivecraft Factions - 1.6.9.5-U0.2.1-1.9.7-BETA + 1.6.9.5-U0.2.1-2.0.0-BETA jar SaberFactions From 2d0d3c96fc772f351fda659f05bc91431df2b74c Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 29 Sep 2019 06:50:45 -0400 Subject: [PATCH 02/13] Little thing to avoid npe's being thrown in the console --- .../java/com/massivecraft/factions/discord/CmdInviteBot.java | 1 - .../com/massivecraft/factions/discord/FactionChatHandler.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/discord/CmdInviteBot.java b/src/main/java/com/massivecraft/factions/discord/CmdInviteBot.java index 252a9452..bf991a62 100644 --- a/src/main/java/com/massivecraft/factions/discord/CmdInviteBot.java +++ b/src/main/java/com/massivecraft/factions/discord/CmdInviteBot.java @@ -7,7 +7,6 @@ import com.massivecraft.factions.zcore.util.TL; import mkremins.fanciful.FancyMessage; import net.dv8tion.jda.core.JDA; import net.dv8tion.jda.core.Permission; -import org.bukkit.ChatColor; public class CmdInviteBot extends FCommand { diff --git a/src/main/java/com/massivecraft/factions/discord/FactionChatHandler.java b/src/main/java/com/massivecraft/factions/discord/FactionChatHandler.java index d799a0aa..791e3d43 100644 --- a/src/main/java/com/massivecraft/factions/discord/FactionChatHandler.java +++ b/src/main/java/com/massivecraft/factions/discord/FactionChatHandler.java @@ -38,6 +38,9 @@ public class FactionChatHandler extends ListenerAdapter { private void startBot() { try { jda = new JDABuilder(AccountType.BOT).setToken(Conf.discordBotToken).buildBlocking(); + if(jda == null) { + System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - Please Make a Valid Token To Use Discord Features! Location Conf.json discordBotToken.\n\n\n"); + } } catch (LoginException | InterruptedException e) { e.printStackTrace(); } From ed9b2419a6891a561021188e83959e654cae468b Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 29 Sep 2019 07:24:37 -0400 Subject: [PATCH 03/13] Jar reduced by 200kbs --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 60892eef..6c990808 100644 --- a/pom.xml +++ b/pom.xml @@ -383,10 +383,9 @@ com.jagrosh - jda-utilities + jda-utilities-commons 2.1 compile - pom From 22ed86b4d850b25179484a2c95e925fcfb14e070 Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 29 Sep 2019 08:13:48 -0400 Subject: [PATCH 04/13] Added f points to stats discord command --- .../java/com/massivecraft/factions/discord/DiscordListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/massivecraft/factions/discord/DiscordListener.java b/src/main/java/com/massivecraft/factions/discord/DiscordListener.java index 28f44546..a9a64bc5 100644 --- a/src/main/java/com/massivecraft/factions/discord/DiscordListener.java +++ b/src/main/java/com/massivecraft/factions/discord/DiscordListener.java @@ -208,7 +208,7 @@ public class DiscordListener extends ListenerAdapter { EmbedBuilder embedBuilder = new EmbedBuilder().setColor(Color.MAGENTA).setTitle("Faction Stats").setAuthor(ChatColor.stripColor(faction.getTag())).addField("Description", faction.getDescription(), false).addField("Players Online", String.valueOf(faction.getOnlinePlayers().size()), true).addField("Total players", String.valueOf(faction.getFPlayers().size()), true).addField("Alts", String.valueOf(faction.getAltPlayers().size()), true).addField("Land", String.valueOf(faction.getLandRounded()), true).addField("Power", faction.getPowerRounded() + "/" + faction.getPowerMaxRounded(), true); Faction guildFaction = this.getFaction(event.getGuild()); if (guildFaction != null && guildFaction.getId().equals(faction.getId()) && this.canAccessRole(guildFaction, event.getMember())) { - embedBuilder.addField("Kills", String.valueOf(faction.getKills()), true).addField("Deaths", String.valueOf(faction.getDeaths()), true); + embedBuilder.addField("Kills", String.valueOf(faction.getKills()), true).addField("Points", String.valueOf(faction.getPoints()), true).addField("Deaths", String.valueOf(faction.getDeaths()), true); } event.getChannel().sendMessage(embedBuilder.build()).queue(); } From a1f527346aa270cafbe7e338292ba16b19a71a60 Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 29 Sep 2019 18:45:48 -0400 Subject: [PATCH 05/13] Fixed NPE on Guild loading --- .../factions/discord/DiscordListener.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/discord/DiscordListener.java b/src/main/java/com/massivecraft/factions/discord/DiscordListener.java index a9a64bc5..09cd9f73 100644 --- a/src/main/java/com/massivecraft/factions/discord/DiscordListener.java +++ b/src/main/java/com/massivecraft/factions/discord/DiscordListener.java @@ -16,7 +16,6 @@ import java.awt.*; import java.io.File; import java.io.IOException; import java.nio.file.Files; -import java.nio.file.attribute.FileAttribute; import java.text.DecimalFormat; import java.util.List; import java.util.*; @@ -37,27 +36,30 @@ public class DiscordListener extends ListenerAdapter { private static JSONGuilds loadGuilds() { try { - if (!DiscordListener.file.exists()) { - Files.createFile(DiscordListener.file.toPath(), (FileAttribute[]) new FileAttribute[0]); - Files.write(DiscordListener.file.toPath(), "{}".getBytes()); - } - return FactionsPlugin.getInstance().gson.fromJson(String.join("\n", Files.readAllLines(DiscordListener.file.toPath())), JSONGuilds.class); + if (file.exists()) + return FactionsPlugin.getInstance().gson.fromJson(String.join("\n", Files.readAllLines(file.toPath())), JSONGuilds.class); + Files.createFile(file.toPath()); + Files.write(file.toPath(), "{}".getBytes()); + return FactionsPlugin.getInstance().gson.fromJson(String.join("\n", Files.readAllLines(file.toPath())), JSONGuilds.class); } catch (IOException e) { e.printStackTrace(); throw new NullPointerException(); } } + public static void saveGuilds() { try { - String content = FactionsPlugin.getInstance().gson.toJson(DiscordListener.guilds); - Files.write(DiscordListener.file.toPath(), content.getBytes()); - } catch (IOException e) { + String content = FactionsPlugin.getInstance().gson.toJson(guilds); + Files.write(file.toPath(), content.getBytes()); + } + catch (IOException e) { e.printStackTrace(); throw new NullPointerException(); } } + public void onGuildMessageReceived(GuildMessageReceivedEvent event) { try { if (event.getMessage().isWebhookMessage() || event.getAuthor().isBot()) { From abf5c450535cbffbb7acba8b9e98f66e24a628cb Mon Sep 17 00:00:00 2001 From: Driftay Date: Sun, 29 Sep 2019 18:51:24 -0400 Subject: [PATCH 06/13] Version Change --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6c990808..3f428856 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.massivecraft Factions - 1.6.9.5-U0.2.1-2.0.0-BETA + 1.6.9.5-U0.2.1-2.0.1-BETA jar SaberFactions From 07fa138d58f641472776a96dc7e0b174d3f610fc Mon Sep 17 00:00:00 2001 From: Driftay Date: Mon, 30 Sep 2019 16:03:44 -0400 Subject: [PATCH 07/13] Disabled Discord Features By Default --- src/main/java/com/massivecraft/factions/Conf.java | 2 +- src/main/java/com/massivecraft/factions/FactionsPlugin.java | 2 ++ .../com/massivecraft/factions/discord/FactionChatHandler.java | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/Conf.java b/src/main/java/com/massivecraft/factions/Conf.java index 05dc2e1d..39e9710c 100644 --- a/src/main/java/com/massivecraft/factions/Conf.java +++ b/src/main/java/com/massivecraft/factions/Conf.java @@ -98,7 +98,7 @@ public class Conf { public static boolean worldGuardChecking = false; public static boolean worldGuardBuildPriority = false; //DISCORD - public static boolean useDiscordSystem = true; + public static boolean useDiscordSystem = false; public static String discordBotToken = ""; public static String fromDiscordFactionChatPrefix = "&f[&dDiscord&f] "; public static String avatarUrl = "http://cravatar.eu/helmavatar/%uuid%.png"; diff --git a/src/main/java/com/massivecraft/factions/FactionsPlugin.java b/src/main/java/com/massivecraft/factions/FactionsPlugin.java index f749bd88..1eccbee1 100755 --- a/src/main/java/com/massivecraft/factions/FactionsPlugin.java +++ b/src/main/java/com/massivecraft/factions/FactionsPlugin.java @@ -261,6 +261,8 @@ public class FactionsPlugin extends MPlugin { } if(Conf.useDiscordSystem) { new FactionChatHandler(this); + } else { + System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - You are not using Discord integration features, set conf.json option useDiscordSystem to true and put a valid token in before using!\n\n\n"); } ShopConfig.setup(); diff --git a/src/main/java/com/massivecraft/factions/discord/FactionChatHandler.java b/src/main/java/com/massivecraft/factions/discord/FactionChatHandler.java index 73241006..7f0e3b5d 100644 --- a/src/main/java/com/massivecraft/factions/discord/FactionChatHandler.java +++ b/src/main/java/com/massivecraft/factions/discord/FactionChatHandler.java @@ -40,9 +40,6 @@ public class FactionChatHandler extends ListenerAdapter { private void startBot() { try { jda = new JDABuilder(AccountType.BOT).setToken(Conf.discordBotToken).buildBlocking(); - if(jda == null) { - System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - Please Make a Valid Token To Use Discord Features! Location Conf.json discordBotToken.\n\n\n"); - } } catch (LoginException | InterruptedException e) { e.printStackTrace(); } From 10f06baadcb40f2a73e6828c61900ed04f60a71c Mon Sep 17 00:00:00 2001 From: Driftay Date: Mon, 30 Sep 2019 16:04:41 -0400 Subject: [PATCH 08/13] Version Change --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3f428856..649f4079 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.massivecraft Factions - 1.6.9.5-U0.2.1-2.0.1-BETA + 1.6.9.5-U0.2.1-2.0.2-BETA jar SaberFactions From a057a235b845e2530ec81a2071a8bc66f46b0ee2 Mon Sep 17 00:00:00 2001 From: Driftay Date: Tue, 1 Oct 2019 12:18:44 -0400 Subject: [PATCH 09/13] Fixed a Bunch of Misc stuff & Made config.yml CLEAN --- .../massivecraft/factions/cmd/CmdUnban.java | 2 +- .../factions/cmd/check/CheckTask.java | 7 + .../factions/cmd/check/WeeWooTask.java | 7 +- .../massivecraft/factions/cmd/tnt/CmdTnt.java | 8 +- .../factions/zcore/persist/MemoryFPlayer.java | 4 +- .../massivecraft/factions/zcore/util/TL.java | 2 +- src/main/resources/config.yml | 378 +++++++++--------- 7 files changed, 208 insertions(+), 200 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdUnban.java b/src/main/java/com/massivecraft/factions/cmd/CmdUnban.java index 5246742f..561f1586 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdUnban.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdUnban.java @@ -44,7 +44,7 @@ public class CmdUnban extends FCommand { context.faction.unban(target); context.msg(TL.COMMAND_UNBAN_UNBANNED, context.fPlayer.getName(), target.getName()); - target.msg(TL.COMMAND_UNBAN_TARGET, context.faction.getTag(target)); + target.msg(TL.COMMAND_UNBAN_TARGET.toString(), context.faction.getTag(target)); } @Override diff --git a/src/main/java/com/massivecraft/factions/cmd/check/CheckTask.java b/src/main/java/com/massivecraft/factions/cmd/check/CheckTask.java index cde3263a..f0bfd61c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/check/CheckTask.java +++ b/src/main/java/com/massivecraft/factions/cmd/check/CheckTask.java @@ -77,6 +77,9 @@ public class CheckTask implements Runnable { } faction.msg(TL.CHECK_WALLS_CHECK); + if (!Conf.useDiscordSystem) return; + + String channelId = faction.getWallNotifyChannelId(); if (channelId == null) { continue; @@ -122,6 +125,10 @@ public class CheckTask implements Runnable { CheckTask.bufferChecks.add(faction.getId()); } faction.msg(TL.CHECK_BUFFERS_CHECK); + + if (!Conf.useDiscordSystem) return; + + String channelId = faction.getBufferNotifyChannelId(); if (channelId == null) { continue; diff --git a/src/main/java/com/massivecraft/factions/cmd/check/WeeWooTask.java b/src/main/java/com/massivecraft/factions/cmd/check/WeeWooTask.java index 168b953f..187a794a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/check/WeeWooTask.java +++ b/src/main/java/com/massivecraft/factions/cmd/check/WeeWooTask.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd.check; +import com.massivecraft.factions.Conf; import com.massivecraft.factions.Faction; import com.massivecraft.factions.Factions; import com.massivecraft.factions.FactionsPlugin; @@ -24,9 +25,9 @@ public class WeeWooTask implements Runnable { continue; } faction.msg(TL.WEE_WOO_MESSAGE); - if (!FactionChatHandler.jda.getStatus().equals(JDA.Status.CONNECTED)) { - continue; - } + + if (!Conf.useDiscordSystem) return; + String discordChannelId = faction.getWeeWooChannelId(); if (discordChannelId == null || discordChannelId.isEmpty()) { continue; diff --git a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTnt.java b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTnt.java index f8b1a17c..21432765 100644 --- a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTnt.java +++ b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTnt.java @@ -115,16 +115,16 @@ public class CmdTnt extends FCommand { context.msg(TL.GENERIC_ARGS_TOOFEW); context.msg(context.args.get(0).equalsIgnoreCase("take") || context.args.get(0).equalsIgnoreCase("t") ? TL.COMMAND_TNT_TAKE_DESCRIPTION : TL.COMMAND_TNT_ADD_DESCRIPTION); } - context.sendMessage(TL.COMMAND_TNT_AMOUNT.toString().replace("{amount}", context.faction.getTnt() + "").replace("{bankSize}", context.faction.getTntBankLimit() + "")); + context.msg(TL.COMMAND_TNT_AMOUNT, context.faction.getTnt(), context.faction.getTntBankLimit()); } public boolean inventoryContains(Inventory inventory, ItemStack item) { int count = 0; ItemStack[] items = inventory.getContents(); - for (int i = 0; i < items.length; i++) { - if (items[i] != null && items[i].getType() == item.getType() && items[i].getDurability() == item.getDurability()) { - count += items[i].getAmount(); + for (ItemStack item1 : items) { + if (item1 != null && item1.getType() == item.getType() && item1.getDurability() == item.getDurability()) { + count += item1.getAmount(); } if (count >= item.getAmount()) { return 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 a78e2b6d..22df0baa 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java @@ -805,7 +805,7 @@ public abstract class MemoryFPlayer implements FPlayer { int factionBuffer = FactionsPlugin.getInstance().getConfig().getInt("hcf.buffer-zone", 0); int worldBuffer = FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0); - if (Conf.worldGuardChecking && Worldguard.checkForRegionsInChunk(flocation)) { + if (Conf.worldGuardChecking && Worldguard.checkForRegionsInChunk(flocation) && !this.isAdminBypassing()) { // Checks for WorldGuard regions in the chunk attempting to be claimed error = FactionsPlugin.getInstance().txt.parse(TL.CLAIM_PROTECTED.toString()); } else if (flocation.isOutsideWorldBorder(FactionsPlugin.getInstance().getConfig().getInt("world-border.buffer", 0))) { @@ -1226,7 +1226,7 @@ public abstract class MemoryFPlayer implements FPlayer { } LandClaimEvent claimEvent = new LandClaimEvent(flocation, forFaction, this); - Bukkit.getScheduler().runTask(FactionsPlugin.getInstance(), () -> Bukkit.getPluginManager().callEvent(claimEvent)); + Bukkit.getPluginManager().callEvent(claimEvent); if (claimEvent.isCancelled()) { return false; } diff --git a/src/main/java/com/massivecraft/factions/zcore/util/TL.java b/src/main/java/com/massivecraft/factions/zcore/util/TL.java index 162fbdcc..3ca7a322 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TL.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TL.java @@ -881,7 +881,7 @@ public enum TL { COMMAND_TNT_WIDTHDRAW_SUCCESS("&cSuccessfully withdrew tnt."), COMMAND_TNT_WIDTHDRAW_NOTENOUGH("&cNot enough tnt in bank."), COMMAND_TNT_DEPOSIT_NOTENOUGH("&cNot enough tnt in tnt inventory."), - COMMAND_TNT_AMOUNT("&cYour faction has {amount} tnt out of {bankSize} in the tnt bank."), + COMMAND_TNT_AMOUNT("&cYour faction has %1$s tnt out of %2$s in the tnt bank."), COMMAND_TNT_POSITIVE("&cPlease use positive numbers!"), COMMAND_TNT_DESCRIPTION("add/widthraw from faction's tnt bank"), COMMAND_TNT_WIDTHDRAW_NOTENOUGH_SPACE("&cNot enough space in your inventory."), diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index e9a30032..64791e2a 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -274,19 +274,19 @@ hcf: show: # First line can be {header} for default header, or any string (we recommend &m for smooth lines ;plugin) - '&8&m--------------&7 &8<&e{faction}&8> &8&m--------------' - - '&6 * &cOwner: &7{leader}' - - '&6 * &cDescription: &7{description}' - - '&6 * &cLand / Power / Max Power: &7{chunks} &8/ &7{power} &8/ &7{maxPower}' - - '&6 * &cFaction Strikes: &7{strikes}' - - '&6 * &cFaction Points: &7{faction-points}' - - '&6 * &cFounded: &7{create-date}' - - '&6 * &cBalance: &f{faction-balance}' - - '&6 * &cAllies: &5{allies-list}' - - '&6 * &cEnemies: &c{enemies-list}' - - '&6 * &cOnline Members: &8(&7{online}/{members}&8) &7{online-list}' - - '&6 * &cOffline Members: &8(&7{offline}/{members}&8) &7{offline-list}' - - '&6 * &cAlts: &8{alts}' - - '&6 * &cBans: &7{faction-bancount}' + - '&4&l* &cOwner: &f{leader}' + - '&4&l* &cDescription: &f{description}' + - '&4&l* &cLand / Power / Max Power: &f{chunks} &8/ &f{power} &8/ &f{maxPower}' + - '&4&l* &cFaction Strikes: &f{strikes}' + - '&4&l* &cFaction Points: &f{faction-points}' + - '&4&l* &cFounded: &f{create-date}' + - '&4&l* &cBalance: &f{faction-balance}' + - '&4&l* &cAllies: &a{allies-list}' + - '&4&l* &cEnemies: &4{enemies-list}' + - '&4&l* &cOnline Members: &8[&f{online}/{members}&8] &a{online-list}' + - '&4&l* &cOffline Members: &8[&f{offline}/{members}&8] &a{offline-list}' + - '&4&l* &cAlts: &f{alts}' + - '&4&l* &cBans: &f{faction-bancount}' - '&8&m----------------------------------------' # For a /f show that does not display fancy messages that are essentially empty, use minimal-show minimal-show: false @@ -303,13 +303,15 @@ show-exempt: # Lines that arent defined wont be sent (home not set, faction not peaceful / permanent, dtr freeze) map: # First line can be {header} for default header, or any string (we recommend &m for smooth lines ;plugin) - - '&6* &cFaction: &7{faction}' - - '&6* &cOwner: &7{leader}' - - '&6* &cLand / Power / Max Power: &7{chunks} &8/ &7{power} &8/ &7{maxPower}' - - '&6* &cAllies: &5{allies-list}' - - '&6* &cEnemies: &c{enemies-list}' - - '&6* &cOnline Members: &8(&7{online}/{members}&8) {online-list}' - - '&6* &cOffline Members: &7{offline-list}' + - '' + - '&4&l* &cFaction &f{faction}' + - '&4&l* &cOwner &f{leader}' + - '&4&l* &cLand / Power / Max Power: &f{chunks} &8/ &f{power} &8/ &f{maxPower}' + - '&4&l* &cAllies &a{allies-list}' + - '&4&l* &cEnemies &4{enemies-list}' + - '&4&l* &cOnline Members &8[&f{online}/{members}&8] &a{online-list}' + - '&4&l* &cOffline Members &4{offline-list}' + - '' ############################################################ # +------------------------------------------------------+ # @@ -426,7 +428,7 @@ help: fperm-gui: relation: # GUI Name - name: 'Faction Permissions' + name: '&8&lFaction Permissions' # Amount of inventory rows, No larger than 5 rows: 4 # These are the slots where the relations are going to be placed on the first GUI @@ -452,7 +454,7 @@ fperm-gui: enemy: DIAMOND_AXE neutral: WOOD_AXE Placeholder-Item: - Name: '&cClick to edit {relation} permissions!' + Name: '&c{relation}&f permissions!' action: name: 'Faction Permissions' rows: 6 @@ -527,14 +529,14 @@ fperm-gui: # {action-access} Access name eg: Allow, Deny # {action-access-color} Access color eg: Allow;GREEN placeholder-item: - name: '&c&l(!) &ePermission: &6&n{action}' + name: '&c&lPermission to {action}' lore: - '' - - '&6&l * &cStatus: &8[{action-access-color}{action-access}&8]' + - '&4&l* &cStatus: &f{action-access-color}{action-access}' - '' - - '&7Left click to &a&nAllow&7.' - - '&7Right click to &c&nDeny&7.' - - '&7Middle click to &7&nUndefined&7.' + - '&2&l* &aLeft click to &alAllow&a.' + - '&4&l* &cRight click to &c&lDeny&c.' + - '&8&l* &7Middle click to &7&lUndefine&7.' # Back item will be take you to the previous GUI back-item: Type: ARROW @@ -566,16 +568,16 @@ fwarp-gui: - 15 warp-item: Type: EYE_OF_ENDER - Name: '&c&l(!) &eFaction Warp: &6&n{warp}' + Name: '&c&lFaction Warp {warp}' # {warp-protected} Warp protection by password, Enabled & Disabled # {warp-cost} Warp cost Lore: - '' - - '&6&l * &cPassword: &7{warp-protected}' - - '&6&l * &cCost: &7{warp-cost}' + - '&4&l* &cPassword: &f{warp-protected}' + - '&4&l* &cCost: &f{warp-cost}' - '' - - '&c&lNote: &7You need pay to teleport to' - - '&7a faction warp. Unless it''s &nDisabled&7.' + - '&7&o(( Tip: You need &c&opay&7&o to &f&oteleport to' + - '&7&oa &a&ofaction warp&7&o. Unless it''s &c&oDisabled&7&o. ))' # Dummy Items dummy-item: Type: BLACK_STAINED_GLASS_PANE @@ -638,8 +640,13 @@ f-alts: frules: Enabled: true default-rules: - - '&cDefault Faction Rules :(' - - '&cUse /f rules add to add a rule' + - '&f' + - '&r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &r &f&l«&c&l*&4&l*&c&l*&f&l»&r &c&lFaction Rules &r &f&l«&c&l*&4&l*&c&l*&f&l»' + - '&r &r &r &fWith this feature you can set &cstandars&f for your &afaction' + - '&r &r &r &r &r &r &fPut as many &crules&f as you desire for your &amembers' + - '&f' + - '&r &r &r &r &r &r &r &r &r &r &r &7&o(( Tip: Use &f&o/f rules add &7&o add a &c&orule&7&o ))' + - '' ############################################################ # +------------------------------------------------------+ # # | Faction TNT Bank | # @@ -742,7 +749,7 @@ f-points: ############################################################ MissionGUISize: 3 Missions-Enabled: true -Missions-GUI-Title: '&bFaction Missions' +Missions-GUI-Title: '&8&lFaction Missions' MaximumMissionsAllowedAtOnce: 1 Mission-Progress-Format: '&b&lProgression: &f{progress}&7/&e{total}' DenyMissionsMoreThenOnce: true #this setting to true, means that if they complete a mission they cannot redo the same mission @@ -870,7 +877,7 @@ fchest: fupgrades: Enabled: true MainMenu: - Title: '{faction}''s Upgrade Menu' + Title: '&8&l{faction}''s Upgrade Menu' DummyItem: rows: 5 Name: '&f' @@ -887,26 +894,25 @@ fupgrades: level-2: 500000 level-3: 750000 CropItem: - Name: '&c&lUpgrade Growth Speed' + Name: '&c&lGrowth Speed' Type: WHEAT Amount: 1 Damage: 0 Lore: - - '&7Increase growth speed of crops in claims.' - - '&7&o(Chance to Grow Two Levels)' + - '&7&oIncrease growth &c&ospeed&7&o of crops in &c&oclaims.' + - '&7&oChance to Grow Two Levels. Current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lChances' + - '&4&l* &cLevel 1: &f10% Chance' + - '&4&l* &cLevel 2: &f20% Chance' + - '&4&l* &cLevel 3: &f30% Chance' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$250,000' + - '&4&l* &cLevel 2: &f$500,000' + - '&4&l* &cLevel 3: &f$750,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f10% Chance' - - '&7 - Cost: $250,000' - - '&f&l* &7Level 2 - &f20% Chance' - - '&7 - Cost: $500,000' - - '&f&l* &7Level 3 - &f30% Chance' - - '&7 - Cost: $750,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 31 EXP: @@ -919,25 +925,25 @@ fupgrades: level-2: 4000000 level-3: 6000000 EXPItem: - Name: '&c&lUpgrade EXP Drop Rate' + Name: '&c&lEXP Drop Rate' Type: EXP_BOTTLE Amount: 1 Damage: 0 Lore: - - '&7Increased Vanilla XP gained from monsters.' + - '&7&oIncreased Vanilla &e&oEXP&7&o gained from &c&omonsters&7&o.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lMultipliers' + - '&4&l* &cLevel 1: &f1.5' + - '&4&l* &cLevel 2: &f2.0' + - '&4&l* &cLevel 3: &f2.5' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$2,000,000' + - '&4&l* &cLevel 2: &f$4,000,000' + - '&4&l* &cLevel 3: &f$6,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f1.5x Multiplier' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 2 - &f2.0x Multiplier' - - '&7 - Cost: $4,000,000' - - '&f&l* &7Level 3 - &f2.5x Multiplier' - - '&7 - Cost: $6,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 32 Power: @@ -955,21 +961,20 @@ fupgrades: Amount: 1 Damage: 0 Lore: - - '&7&o(Increase the amount of power' - - '&7&oyour faction has)' + - '&a&oIncrease&7&o the amount of &c&opower' + - '&7&oyour &a&ofaction has&7&o. Current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lIncreased Faction Power' + - '&4&l* &cLevel 1: &f100' + - '&4&l* &cLevel 2: &f200' + - '&4&l* &cLevel 3: &f300' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$1,000,000' + - '&4&l* &cLevel 2: &f$2,000,000' + - '&4&l* &cLevel 3: &f$3,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f100 Increased Faction Power' - - '&7 - Cost: $1,000,000' - - '&f&l* &7Level 2 - &f200 Increased Faction Power' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 3 - &f300 Increased Faction Power' - - '&7 - Cost: $3,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 22 Redstone: @@ -980,13 +985,12 @@ fupgrades: Amount: 1 Damage: 0 Lore: - - '&7&o(Prevents water from being' - - '&7&oable to break redstone)' + - '&7&oPrevents &e&owater&7&o from being' + - '&7&oable to break &c&oredstone' - '' - - '&f&l* &7Current Level: &3{level}/1' + - '&4&l* &cCost: &f$1,000,000' - '' - - '&7 - Cost: $1,000,000' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oLeft-click&7&o to &c&oupgrade&7&o ))' slots: - 23 Spawners: @@ -1000,25 +1004,25 @@ fupgrades: level-2: 2000000 level-3: 3000000 SpawnerItem: - Name: '&c&lUpgrade Spawn Rate' + Name: '&c&lSpawn Rate' Type: MOB_SPAWNER Amount: 1 Damage: 0 Lore: - - '&7Decreased mob spawner delay in claims.' + - '&c&oDecreased&7&o mob spawner delay in &a&oclaims&7&o.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lDecreased Spawner Delay' + - '&4&l* &cLevel 1: &f0.10%' + - '&4&l* &cLevel 2: &f0.20%' + - '&4&l* &cLevel 3: &f0.30' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$1,000,000' + - '&4&l* &cLevel 2: &f$2,000,000' + - '&4&l* &cLevel 3: &f$3,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f10% Lower Delay' - - '&7 - Cost: $1,000,000' - - '&f&l* &7Level 2 - &f20% Lower Delay' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 3 - &f30% Lower Delay' - - '&7 - Cost: $3,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 30 DamageReduct: @@ -1031,26 +1035,25 @@ fupgrades: level-2: 4000000 level-3: 6000000 ReduceItem: - Name: '&c&lDamage Reduction Upgrade' + Name: '&c&lDamage Reduction' Type: GOLD_CHESTPLATE Amount: 1 Damage: 0 Lore: - - '&7Reduce the amount of damage taken' - - '&7in your faction claims.' + - '&a&oReduce&7&o the amount of &a&odamage taken&7&o in faction claims.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lDamage Increase' + - '&4&l* &cLevel 1: &f3%' + - '&4&l* &cLevel 2: &f5%' + - '&4&l* &cLevel 3: &f7%' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$2,000,000' + - '&4&l* &cLevel 2: &f$4,000,000' + - '&4&l* &cLevel 3: &f$6,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &7((&f-3% Damage Per Hit&7))' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 2 - &7((&f-5% Damage Per Hit&7))' - - '&7 - Cost: $4,000,000' - - '&f&l* &7Level 3 - &7((&f-7% Damage Per Hit&7))' - - '&7 - Cost: $6,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 7 DamageIncrease: @@ -1063,26 +1066,25 @@ fupgrades: level-2: 4000000 level-3: 6000000 IncreaseItem: - Name: '&c&lDamage Increase Upgrade' + Name: '&c&lDamage Increase' Type: DIAMOND_SWORD Amount: 1 Damage: 0 Lore: - - '&7Increase the amount of damage given' - - '&7in your faction claims.' + - '&a&oIncrease&7&o the amount of &a&odamage given&7&o.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lDamage Increase' + - '&4&l* &cLevel 1: &f3%' + - '&4&l* &cLevel 2: &f5%' + - '&4&l* &cLevel 3: &f7%' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$2,000,000' + - '&4&l* &cLevel 2: &f$4,000,000' + - '&4&l* &cLevel 3: &f$6,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &7((&f+3% Damage Per Hit&7))' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 2 - &7((&f+5% Damage Per Hit&7))' - - '&7 - Cost: $4,000,000' - - '&f&l* &7Level 3 - &7((&f+7% Damage Per Hit&7))' - - '&7 - Cost: $6,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 1 TNT: @@ -1095,26 +1097,25 @@ fupgrades: level-2: 4000000 level-3: 6000000 TntItem: - Name: '&c&lTNT Bank Upgrade' + Name: '&c&lTNT Bank' Type: TNT Amount: 1 Damage: 0 Lore: - - '&7Upgrade Your tnt bank limit,' - - '&7to be eligible to store more tnt.' + - '&a&oUpgrade&7&o your &a&ofactions tnt&7&o limit.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lFaction Tnt Limit' + - '&4&l* &cLevel 1: &f500,000' + - '&4&l* &cLevel 2: &f1,000,000' + - '&4&l* &cLevel 3: &f2,000,000' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$1,000,000' + - '&4&l* &cLevel 2: &f$2,000,000' + - '&4&l* &cLevel 3: &f$3,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f500,000 TNT' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 2 - &f1,000,000 TNT' - - '&7 - Cost: $4,000,000' - - '&f&l* &7Level 3 - &f2,000,000 TNT' - - '&7 - Cost: $6,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 21 Warps: @@ -1127,26 +1128,25 @@ fupgrades: level-2: 2000000 level-3: 3000000 WarpItem: - Name: '&c&lWarp Upgrade' + Name: '&c&lWarps' Type: EYE_OF_ENDER Amount: 1 Damage: 0 Lore: - - '&7Upgrade Your warp limit,' - - '&7to be able to set more warps.' + - '&a&oIncrease&7&o the &a&ofaction warp&7&o limit.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lFaction Warp Limit' + - '&4&l* &cLevel 1: &f3' + - '&4&l* &cLevel 2: &f4' + - '&4&l* &cLevel 3: &f5' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$1,000,000' + - '&4&l* &cLevel 2: &f$2,000,000' + - '&4&l* &cLevel 3: &f$3,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f3 Warps' - - '&7 - Cost: $1,000,000' - - '&f&l* &7Level 2 - &f4 Warps' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 3 - &f5 Warps' - - '&7 - Cost: $3,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 24 Chest: @@ -1160,25 +1160,25 @@ fupgrades: level-2: 2000000 level-3: 3000000 ChestItem: - Name: '&c&lUpgrade Faction Chest Size' + Name: '&c&lFaction Chest' Type: CHEST Amount: 1 Damage: 0 Lore: - - '&7Increased Faction Chest Size.' + - '&a&oIncreased&7&o Faction Chest Size.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lFaction Chest Size' + - '&4&l* &cLevel 1: &f2 Rows' + - '&4&l* &cLevel 2: &f3 Rows' + - '&4&l* &cLevel 3: &f4 Rows' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$1,000,000' + - '&4&l* &cLevel 2: &f$2,000,000' + - '&4&l* &cLevel 3: &f$3,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f2 Rows' - - '&7 - Cost: $1,000,000' - - '&f&l* &7Level 2 - &f3 Rows' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 3 - &f4 Rows' - - '&7 - Cost: $3,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 20 Members: @@ -1191,25 +1191,25 @@ fupgrades: level-2: 2000000 level-3: 3000000 MembersItem: - Name: '&c&lUpgrade Faction Members' + Name: '&c&lFaction Members' Type: PAPER Amount: 1 Damage: 0 Lore: - - '&7Increase faction member limit.' + - '&a&oIncrease&7&o the &a&ofaction member&7&o limit.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lFaction Member Limit' + - '&4&l* &cLevel 1: &f30' + - '&4&l* &cLevel 2: &f35' + - '&4&l* &cLevel 3: &f40' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$1,000,000' + - '&4&l* &cLevel 2: &f$2,000,000' + - '&4&l* &cLevel 3: &f$3,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f30 Members' - - '&7 - Cost: $1,000,000' - - '&f&l* &7Level 2 - &f35 Members' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 3 - &f40 Members' - - '&7 - Cost: $3,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 40 Armor: @@ -1223,25 +1223,25 @@ fupgrades: level-2: 2000000 level-3: 3000000 ArmorItem: - Name: '&c&lReinforced Armor Upgrade' + Name: '&c&lReinforced Armor' Type: DIAMOND_CHESTPLATE Amount: 1 Damage: 0 Lore: - - '&7Decreases damage to armor.' + - '&a&oDecreases&7&o damage done &a&oto armor&7&o.' + - '&7&oYour current level is &e&l&o{level}' - '' - - '&c&lTier' - - '&f&l* &7Current Level: &3{level}/3' + - '&c&lReinforced Armor' + - '&4&l* &cLevel 1: &f0.10%' + - '&4&l* &cLevel 2: &f0.15%' + - '&4&l* &cLevel 3: &f0.20%' + - '&f' + - '&c&lCosts' + - '&4&l* &cLevel 1: &f$1,000,000' + - '&4&l* &cLevel 2: &f$2,000,000' + - '&4&l* &cLevel 3: &f$3,000,000' - '' - - '&c&lPerks' - - '&f&l* &7Level 1 - &f10% Reduction' - - '&7 - Cost: $1,000,000' - - '&f&l* &7Level 2 - &f15% Reduction' - - '&7 - Cost: $2,000,000' - - '&f&l* &7Level 3 - &f20% Reduction' - - '&7 - Cost: $3,000,000' - - '' - - '&e&lClick to &nUnlock' + - '&7&o(( Tip: &f&oleft-click&7&o to &c&oupgrade&7&o ))' slots: - 4 From 6ba970ac137b478182547298287d0ff5ce7b57aa Mon Sep 17 00:00:00 2001 From: Driftay Date: Tue, 1 Oct 2019 12:34:02 -0400 Subject: [PATCH 10/13] 2 typos --- src/main/resources/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 64791e2a..6981e90d 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -900,7 +900,8 @@ fupgrades: Damage: 0 Lore: - '&7&oIncrease growth &c&ospeed&7&o of crops in &c&oclaims.' - - '&7&oChance to Grow Two Levels. Current level is &e&l&o{level}' + - '&7&oChance to Grow Two Levels.' + - 'Current level is &e&l&o{level}' - '' - '&c&lChances' - '&4&l* &cLevel 1: &f10% Chance' @@ -962,7 +963,8 @@ fupgrades: Damage: 0 Lore: - '&a&oIncrease&7&o the amount of &c&opower' - - '&7&oyour &a&ofaction has&7&o. Current level is &e&l&o{level}' + - '&7&oyour &a&ofaction has&7&o.' + - 'Current level is &e&l&o{level}' - '' - '&c&lIncreased Faction Power' - '&4&l* &cLevel 1: &f100' From 4bf1676b2bb4d45a7dcb5526828d44a9cf46abfc Mon Sep 17 00:00:00 2001 From: Driftay <31221930+Driftay@users.noreply.github.com> Date: Wed, 2 Oct 2019 13:47:34 -0400 Subject: [PATCH 11/13] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bdd31512..8a13b1a9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # SaberFactions +![Downloads](https://img.shields.io/github/downloads/driftay/saber-factions/total.svg) + SaberFactions is a fork of both FactionsUUID and SavageFactions. Creators of those plugins include DtrShock and ProSavage. Credits to them. SaberFactions is the newest, latest and greatest factions plugin designed for the best and most functional factions experience minecraft has seen! From bd4f92e1330d095219fffda66c5eb23fca2088f0 Mon Sep 17 00:00:00 2001 From: Driftay <31221930+Driftay@users.noreply.github.com> Date: Wed, 2 Oct 2019 13:49:41 -0400 Subject: [PATCH 12/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a13b1a9..1ad2c490 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SaberFactions -![Downloads](https://img.shields.io/github/downloads/driftay/saber-factions/total.svg) +![Downloads](https://img.shields.io/github/downloads/driftay/saber-factions/total.svg)[![CodeFactor](https://www.codefactor.io/repository/github/driftay/saber-factions/badge)](https://www.codefactor.io/repository/github/driftay/saber-factions) SaberFactions is a fork of both FactionsUUID and SavageFactions. Creators of those plugins include DtrShock and ProSavage. Credits to them. SaberFactions is the newest, latest and greatest factions plugin designed for the best and most functional factions experience minecraft has seen! From fac351d35a0f82e4f1564ce830db3afecd732539 Mon Sep 17 00:00:00 2001 From: Driftay <31221930+Driftay@users.noreply.github.com> Date: Wed, 2 Oct 2019 13:56:28 -0400 Subject: [PATCH 13/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ad2c490..d55132e2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SaberFactions -![Downloads](https://img.shields.io/github/downloads/driftay/saber-factions/total.svg)[![CodeFactor](https://www.codefactor.io/repository/github/driftay/saber-factions/badge)](https://www.codefactor.io/repository/github/driftay/saber-factions) +![Downloads](https://img.shields.io/github/downloads/driftay/saber-factions/total.svg) [![CodeFactor](https://www.codefactor.io/repository/github/driftay/saber-factions/badge)](https://www.codefactor.io/repository/github/driftay/saber-factions) SaberFactions is a fork of both FactionsUUID and SavageFactions. Creators of those plugins include DtrShock and ProSavage. Credits to them. SaberFactions is the newest, latest and greatest factions plugin designed for the best and most functional factions experience minecraft has seen!