From 05e1a7297c425a53d71d249062ae9ee4873d79e4 Mon Sep 17 00:00:00 2001 From: DroppingAnvil Date: Wed, 1 Jan 2020 19:59:31 -0600 Subject: [PATCH 1/2] Change any command (: also refixed tntfill --- .../massivecraft/factions/FactionsPlugin.java | 8 +- .../massivecraft/factions/cmd/Aliases.java | 150 ++++++++++++++++++ .../massivecraft/factions/cmd/CmdAHome.java | 2 +- .../massivecraft/factions/cmd/CmdAdmin.java | 5 +- .../factions/cmd/CmdAnnounce.java | 3 +- .../factions/cmd/CmdAutoHelp.java | 4 +- .../com/massivecraft/factions/cmd/CmdBan.java | 2 +- .../massivecraft/factions/cmd/CmdBanlist.java | 4 +- .../massivecraft/factions/cmd/CmdBanner.java | 3 +- .../massivecraft/factions/cmd/CmdBoom.java | 4 +- .../massivecraft/factions/cmd/CmdBypass.java | 2 +- .../massivecraft/factions/cmd/CmdChat.java | 3 +- .../massivecraft/factions/cmd/CmdChatSpy.java | 2 +- .../factions/cmd/CmdCheckpoint.java | 4 +- .../factions/cmd/CmdColeader.java | 5 +- .../massivecraft/factions/cmd/CmdConfig.java | 2 +- .../massivecraft/factions/cmd/CmdConvert.java | 2 +- .../massivecraft/factions/cmd/CmdCoords.java | 3 +- .../massivecraft/factions/cmd/CmdCreate.java | 2 +- .../factions/cmd/CmdDeinvite.java | 3 +- .../factions/cmd/CmdDelFWarp.java | 4 +- .../factions/cmd/CmdDescription.java | 3 +- .../massivecraft/factions/cmd/CmdDisband.java | 2 +- .../massivecraft/factions/cmd/CmdDiscord.java | 2 +- .../massivecraft/factions/cmd/CmdDrain.java | 2 +- .../massivecraft/factions/cmd/CmdFGlobal.java | 4 +- .../massivecraft/factions/cmd/CmdFWarp.java | 3 +- .../com/massivecraft/factions/cmd/CmdFly.java | 2 +- .../massivecraft/factions/cmd/CmdFocus.java | 2 +- .../factions/cmd/CmdGetVault.java | 2 +- .../massivecraft/factions/cmd/CmdHelp.java | 4 +- .../massivecraft/factions/cmd/CmdHome.java | 2 +- .../massivecraft/factions/cmd/CmdInspect.java | 4 +- .../factions/cmd/CmdInventorySee.java | 3 +- .../massivecraft/factions/cmd/CmdInvite.java | 3 +- .../massivecraft/factions/cmd/CmdJoin.java | 2 +- .../massivecraft/factions/cmd/CmdKick.java | 2 +- .../factions/cmd/CmdKillHolograms.java | 2 +- .../massivecraft/factions/cmd/CmdLeave.java | 2 +- .../massivecraft/factions/cmd/CmdList.java | 3 +- .../massivecraft/factions/cmd/CmdLock.java | 2 +- .../massivecraft/factions/cmd/CmdLogins.java | 5 +- .../massivecraft/factions/cmd/CmdLookup.java | 2 +- .../factions/cmd/CmdLowPower.java | 2 +- .../com/massivecraft/factions/cmd/CmdMap.java | 2 +- .../factions/cmd/CmdMapHeight.java | 3 +- .../com/massivecraft/factions/cmd/CmdMod.java | 5 +- .../factions/cmd/CmdModifyPower.java | 5 +- .../massivecraft/factions/cmd/CmdNear.java | 3 +- .../massivecraft/factions/cmd/CmdOpen.java | 2 +- .../massivecraft/factions/cmd/CmdOwner.java | 2 +- .../factions/cmd/CmdOwnerList.java | 2 +- .../factions/cmd/CmdPaypalSee.java | 3 +- .../factions/cmd/CmdPaypalSet.java | 2 +- .../factions/cmd/CmdPeaceful.java | 2 +- .../massivecraft/factions/cmd/CmdPerm.java | 5 +- .../factions/cmd/CmdPermanent.java | 2 +- .../factions/cmd/CmdPermanentPower.java | 2 +- .../factions/cmd/CmdPlayerTitleToggle.java | 2 +- .../massivecraft/factions/cmd/CmdPower.java | 3 +- .../factions/cmd/CmdPowerBoost.java | 2 +- .../massivecraft/factions/cmd/CmdReload.java | 2 +- .../massivecraft/factions/cmd/CmdRules.java | 4 +- .../com/massivecraft/factions/cmd/CmdSB.java | 3 +- .../massivecraft/factions/cmd/CmdSaveAll.java | 3 +- .../factions/cmd/CmdSeeChunk.java | 3 +- .../factions/cmd/CmdSeeDiscord.java | 3 +- .../factions/cmd/CmdSetBanner.java | 2 +- .../factions/cmd/CmdSetDefaultRole.java | 5 +- .../factions/cmd/CmdSetDiscord.java | 2 +- .../factions/cmd/CmdSetFWarp.java | 3 +- .../factions/cmd/CmdSetMaxVaults.java | 3 +- .../massivecraft/factions/cmd/CmdSethome.java | 2 +- .../massivecraft/factions/cmd/CmdShow.java | 3 +- .../factions/cmd/CmdShowClaims.java | 3 +- .../factions/cmd/CmdShowInvites.java | 2 +- .../factions/cmd/CmdSpawnerLock.java | 3 +- .../massivecraft/factions/cmd/CmdStatus.java | 3 +- .../massivecraft/factions/cmd/CmdStealth.java | 3 +- .../massivecraft/factions/cmd/CmdStrikes.java | 2 +- .../factions/cmd/CmdStrikesGive.java | 2 +- .../factions/cmd/CmdStrikesInfo.java | 2 +- .../factions/cmd/CmdStrikesSet.java | 2 +- .../factions/cmd/CmdStrikesTake.java | 2 +- .../massivecraft/factions/cmd/CmdStuck.java | 3 +- .../com/massivecraft/factions/cmd/CmdTag.java | 3 +- .../massivecraft/factions/cmd/CmdTitle.java | 2 +- .../factions/cmd/CmdToggleAllianceChat.java | 4 +- .../com/massivecraft/factions/cmd/CmdTop.java | 3 +- .../factions/cmd/CmdTpBanner.java | 2 +- .../massivecraft/factions/cmd/CmdUnban.java | 2 +- .../factions/cmd/CmdUpgrades.java | 3 +- .../massivecraft/factions/cmd/CmdVault.java | 2 +- .../factions/cmd/CmdViewChest.java | 3 +- .../factions/cmd/alts/CmdAlts.java | 6 +- .../factions/cmd/alts/CmdAltsList.java | 4 +- .../factions/cmd/alts/CmdInviteAlt.java | 3 +- .../factions/cmd/alts/CmdKickAlt.java | 3 +- .../factions/cmd/audit/CmdAudit.java | 5 +- .../factions/cmd/check/CmdCheck.java | 3 +- .../factions/cmd/check/CmdWeeWoo.java | 3 +- .../factions/cmd/chest/CmdChest.java | 4 +- .../factions/cmd/claim/CmdAutoClaim.java | 3 +- .../factions/cmd/claim/CmdClaim.java | 3 +- .../factions/cmd/claim/CmdClaimAt.java | 3 +- .../factions/cmd/claim/CmdClaimLine.java | 4 +- .../factions/cmd/claim/CmdCorner.java | 3 +- .../factions/cmd/claim/CmdSafeunclaimall.java | 4 +- .../factions/cmd/claim/CmdUnclaim.java | 4 +- .../factions/cmd/claim/CmdUnclaimall.java | 4 +- .../factions/cmd/claim/CmdWarunclaimall.java | 4 +- .../factions/cmd/econ/CmdMoney.java | 4 +- .../factions/cmd/econ/CmdMoneyBalance.java | 4 +- .../factions/cmd/econ/CmdMoneyDeposit.java | 4 +- .../factions/cmd/econ/CmdMoneyTransferFf.java | 3 +- .../factions/cmd/econ/CmdMoneyTransferFp.java | 3 +- .../factions/cmd/econ/CmdMoneyTransferPf.java | 3 +- .../factions/cmd/econ/CmdMoneyWithdraw.java | 4 +- .../factions/cmd/grace/CmdGrace.java | 3 +- .../factions/cmd/logout/CmdLogout.java | 3 +- .../factions/cmd/points/CmdPoints.java | 3 +- .../factions/cmd/points/CmdPointsAdd.java | 3 +- .../factions/cmd/points/CmdPointsRemove.java | 3 +- .../factions/cmd/points/CmdPointsSet.java | 3 +- .../cmd/relational/CmdRelationAlly.java | 3 +- .../cmd/relational/CmdRelationEnemy.java | 3 +- .../cmd/relational/CmdRelationNeutral.java | 3 +- .../cmd/relational/CmdRelationTruce.java | 3 +- .../factions/cmd/reserve/CmdReserve.java | 3 +- .../factions/cmd/roles/CmdDemote.java | 4 +- .../factions/cmd/roles/CmdPromote.java | 5 +- .../massivecraft/factions/cmd/tnt/CmdTnt.java | 3 +- .../factions/cmd/tnt/CmdTntFill.java | 19 ++- .../factions/cmd/wild/CmdWild.java | 3 +- .../factions/discord/Discord.java | 8 +- 135 files changed, 342 insertions(+), 234 deletions(-) create mode 100644 src/main/java/com/massivecraft/factions/cmd/Aliases.java diff --git a/src/main/java/com/massivecraft/factions/FactionsPlugin.java b/src/main/java/com/massivecraft/factions/FactionsPlugin.java index b7521de7..114c5225 100755 --- a/src/main/java/com/massivecraft/factions/FactionsPlugin.java +++ b/src/main/java/com/massivecraft/factions/FactionsPlugin.java @@ -4,10 +4,7 @@ import ch.njol.skript.Skript; import ch.njol.skript.SkriptAddon; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; -import com.massivecraft.factions.cmd.CmdAutoHelp; -import com.massivecraft.factions.cmd.CommandContext; -import com.massivecraft.factions.cmd.FCmdRoot; -import com.massivecraft.factions.cmd.FCommand; +import com.massivecraft.factions.cmd.*; import com.massivecraft.factions.cmd.audit.FChestListener; import com.massivecraft.factions.cmd.audit.FLogManager; import com.massivecraft.factions.cmd.audit.FLogType; @@ -234,7 +231,8 @@ public class FactionsPlugin extends MPlugin { Board.getInstance().load(); Board.getInstance().clean(); - + //Load command aliases + Aliases.load(); // Add Base Commands this.cmdBase = new FCmdRoot(); this.cmdAutoHelp = new CmdAutoHelp(); diff --git a/src/main/java/com/massivecraft/factions/cmd/Aliases.java b/src/main/java/com/massivecraft/factions/cmd/Aliases.java new file mode 100644 index 00000000..2b9d6a3f --- /dev/null +++ b/src/main/java/com/massivecraft/factions/cmd/Aliases.java @@ -0,0 +1,150 @@ +package com.massivecraft.factions.cmd; + +import com.massivecraft.factions.Conf; +import com.massivecraft.factions.FactionsPlugin; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; + +public class Aliases { + /** + * @author DroppingAnvil + */ + public static ArrayList alts_alts = new ArrayList<>(Arrays.asList("alts", "alt")); + public static ArrayList alts_list = new ArrayList<>(Arrays.asList("list", "l")); + public static ArrayList alts_invite = new ArrayList<>(Collections.singletonList("invite")); + public static ArrayList alts_kick = new ArrayList<>(Collections.singletonList("kick")); + public static ArrayList audit = new ArrayList<>(Arrays.asList("audit", "log", "logs")); + public static ArrayList check = new ArrayList<>(Arrays.asList("check")); + public static ArrayList weewoo = new ArrayList<>(Collections.singletonList("weewoo")); + public static ArrayList chest = new ArrayList<>(Arrays.asList("chest", "pv")); + public static ArrayList claim_auto = new ArrayList<>(Collections.singletonList("autoclaim")); + public static ArrayList claim_claim = new ArrayList<>(Collections.singletonList("claim")); + public static ArrayList claim_at = new ArrayList<>(Collections.singletonList("claimat")); + public static ArrayList claim_line = new ArrayList<>(Arrays.asList("claimline", "cl")); + public static ArrayList claim_corner = new ArrayList<>(Arrays.asList("corner")); + public static ArrayList unclaim_all_safe = new ArrayList<>(Arrays.asList("safeunclaimall", "safedeclaimall")); + public static ArrayList unclaim_unclaim = new ArrayList<>(Arrays.asList("unclaim", "declaim")); + public static ArrayList unclaim_all_unsafe = new ArrayList<>(Arrays.asList("unclaimall", "declaimall")); + public static ArrayList unclaim_all_war = new ArrayList<>(Arrays.asList("warunclaimall", "wardeclaimall")); + public static ArrayList money_money = new ArrayList<>(Arrays.asList("money", "bank")); + public static ArrayList money_balance = new ArrayList<>(Arrays.asList("b", "balance")); + public static ArrayList money_deposit = new ArrayList<>(Arrays.asList("d", "deposit")); + public static ArrayList money_transfer_Ff = new ArrayList<>(Collections.singletonList("ff")); + public static ArrayList money_transfer_Fp = new ArrayList<>(Collections.singletonList("fp")); + public static ArrayList money_transfer_Pf = new ArrayList<>(Collections.singletonList("pf")); + public static ArrayList money_withdraw = new ArrayList<>(Arrays.asList("w", "withdraw")); + public static ArrayList grace = new ArrayList<>(Collections.singletonList("grace")); + public static ArrayList logout = new ArrayList<>(Collections.singletonList("logout")); + public static ArrayList points_points = new ArrayList<>(Collections.singletonList("points")); + public static ArrayList points_add = new ArrayList<>(Collections.singletonList("add")); + public static ArrayList points_remove = new ArrayList<>(Collections.singletonList("remove")); + public static ArrayList points_set = new ArrayList<>(Collections.singletonList("set")); + public static ArrayList relation_ally = new ArrayList<>(Collections.singletonList("ally")); + public static ArrayList relation_enemy = new ArrayList<>(Collections.singletonList("enemy")); + public static ArrayList relation_neutral = new ArrayList<>(Collections.singletonList("neutral")); + public static ArrayList relation_truce = new ArrayList<>(Collections.singletonList("truce")); + public static ArrayList reserve = new ArrayList<>(Collections.singletonList("reserve")); + public static ArrayList roles_demote = new ArrayList<>(Collections.singletonList("demote")); + public static ArrayList roles_promote = new ArrayList<>(Collections.singletonList("ally")); + public static ArrayList tnt_tnt = new ArrayList<>(Collections.singletonList("tnt")); + public static ArrayList tnt_tntfill = new ArrayList<>(Collections.singletonList("tntfill")); + public static ArrayList wild = new ArrayList<>(Collections.singletonList("wild")); + public static ArrayList admin = new ArrayList<>(Arrays.asList("admin", "setadmin", "leader", "setleader")); + public static ArrayList ahome = new ArrayList<>(Collections.singletonList("ahome")); + public static ArrayList announce = new ArrayList<>(Arrays.asList("ann", "announce")); + public static ArrayList help = new ArrayList<>(Arrays.asList("help", "h", "?")); + public static ArrayList ban_ban = new ArrayList<>(Collections.singletonList("ban")); + public static ArrayList ban_banlist = new ArrayList<>(Arrays.asList("banlist", "bans", "banl")); + public static ArrayList banner = new ArrayList<>(Collections.singletonList("banner")); + public static ArrayList boom = new ArrayList<>(Arrays.asList("noboom", "explosions", "toggleexplosions")); + public static ArrayList bypass = new ArrayList<>(Collections.singletonList("bypass")); + public static ArrayList chat = new ArrayList<>(Arrays.asList("chat", "c")); + public static ArrayList chatspy = new ArrayList<>(Collections.singletonList("chatspy")); + public static ArrayList checkpoint = new ArrayList<>(Arrays.asList("checkp", "checkpoint", "cpoint")); + public static ArrayList coleader = new ArrayList<>(Arrays.asList("coleader", "setcoleader", "co", "setco")); + public static ArrayList config = new ArrayList<>(Collections.singletonList("config")); + public static ArrayList convert = new ArrayList<>(Collections.singletonList("convert")); + public static ArrayList coords = new ArrayList<>(Arrays.asList("coords", "coord")); + public static ArrayList create = new ArrayList<>(Collections.singletonList("create")); + public static ArrayList debug = new ArrayList<>(Collections.singletonList("debug")); + public static ArrayList deinvite = new ArrayList<>(Arrays.asList("deinvite", "deinv")); + public static ArrayList deletefwarp = new ArrayList<>(Arrays.asList("delwarp", "dw", "deletewarp")); + public static ArrayList description = new ArrayList<>(Arrays.asList("desc", "description")); + public static ArrayList disband = new ArrayList<>(Collections.singletonList("disband")); + public static ArrayList discord_discord = new ArrayList<>(Collections.singletonList("discord")); + public static ArrayList drain = new ArrayList<>(Collections.singletonList("drain")); + public static ArrayList global = new ArrayList<>(Arrays.asList("gchat", "global", "globalchat")); + public static ArrayList fly = new ArrayList<>(Collections.singletonList("fly")); + public static ArrayList focus = new ArrayList<>(Collections.singletonList("focus")); + public static ArrayList warp = new ArrayList<>(Arrays.asList("warp", "warps")); + public static ArrayList getvault = new ArrayList<>(Collections.singletonList("getvault")); + public static ArrayList home = new ArrayList<>(Collections.singletonList("home")); + public static ArrayList inspect = new ArrayList<>(Arrays.asList("inspect", "ins")); + public static ArrayList invsee = new ArrayList<>(Arrays.asList("invsee", "inventorysee")); + public static ArrayList invite = new ArrayList<>(Arrays.asList("invite", "inv")); + public static ArrayList join = new ArrayList<>(Collections.singletonList("join")); + public static ArrayList kick = new ArrayList<>(Collections.singletonList("kick")); + public static ArrayList killholograms = new ArrayList<>(Collections.singletonList("killholos")); + public static ArrayList leave = new ArrayList<>(Collections.singletonList("leave")); + public static ArrayList list = new ArrayList<>(Arrays.asList("list", "ls")); + public static ArrayList lock = new ArrayList<>(Collections.singletonList("lock")); + public static ArrayList logins = new ArrayList<>(Arrays.asList("logins", "login", "logouts")); + public static ArrayList lookup = new ArrayList<>(Collections.singletonList("lookup")); + public static ArrayList lowPower = new ArrayList<>(Collections.singletonList("lowpower")); + public static ArrayList map_map = new ArrayList<>(Collections.singletonList("map")); + public static ArrayList map_height = new ArrayList<>(Arrays.asList("mapheight", "mh")); + public static ArrayList mod = new ArrayList<>(Arrays.asList("mod", "setmod", "officer", "setofficer")); + public static ArrayList modifyPower = new ArrayList<>(Arrays.asList("mp", "pm", "modpower", "modifypower")); + public static ArrayList near = new ArrayList<>(Arrays.asList("near", "nearby")); + public static ArrayList open = new ArrayList<>(Collections.singletonList("open")); + public static ArrayList owner_owner = new ArrayList<>(Collections.singletonList("owner")); + public static ArrayList owner_list = new ArrayList<>(Collections.singletonList("ownerlist")); + public static ArrayList paypal_see = new ArrayList<>(Arrays.asList("paypal", "seepaypal")); + public static ArrayList paypal_set = new ArrayList<>(Collections.singletonList("setpaypal")); + public static ArrayList peaceful = new ArrayList<>(Collections.singletonList("peaceful")); + public static ArrayList perm = new ArrayList<>(Arrays.asList("perm", "perms", "permission", "permissions")); + public static ArrayList permanent_faction = new ArrayList<>(Collections.singletonList("permanent")); + public static ArrayList permanent_power = new ArrayList<>(Collections.singletonList("permanentpower")); + public static ArrayList titles = new ArrayList<>(Collections.singletonList("titles")); + public static ArrayList power_power = new ArrayList<>(Arrays.asList("pow", "power")); + public static ArrayList power_boost = new ArrayList<>(Collections.singletonList("powerboost")); + public static ArrayList reload = new ArrayList<>(Collections.singletonList("reload")); + public static ArrayList rules = new ArrayList<>(Arrays.asList("r", "rule", "rules")); + public static ArrayList saveAll = new ArrayList<>(Arrays.asList("save", "saveall")); + public static ArrayList scoreboard = new ArrayList<>(Arrays.asList("sb", "scoreboard")); + public static ArrayList seeChunk = new ArrayList<>(Arrays.asList("sc", "seechunk")); + public static ArrayList discord_see = new ArrayList<>(Collections.singletonList("seediscord")); + public static ArrayList discord_set = new ArrayList<>(Collections.singletonList("setdiscord")); + public static ArrayList setBanner = new ArrayList<>(Collections.singletonList("setbanner")); + public static ArrayList setDefaultRole = new ArrayList<>(Arrays.asList("defaultrole", "def", "default", "defaultrank")); + public static ArrayList setWarp = new ArrayList<>(Arrays.asList("sw", "setwarp")); + public static ArrayList setHome = new ArrayList<>(Collections.singletonList("sethome")); + public static ArrayList setMaxVaults = new ArrayList<>(Arrays.asList("smv", "setmaxvaults")); + public static ArrayList show_show = new ArrayList<>(Arrays.asList("show", "who")); + public static ArrayList show_claims = new ArrayList<>(Arrays.asList("showclaim", "showclaims")); + public static ArrayList show_invites = new ArrayList<>(Collections.singletonList("showinvites")); + public static ArrayList spawnerlock = new ArrayList<>(Arrays.asList("lockspawners", "spawnerlock")); + public static ArrayList status = new ArrayList<>(Arrays.asList("s", "status")); + public static ArrayList stealth = new ArrayList<>(Arrays.asList("stealth", "ninja")); + public static ArrayList strikes_strikes = new ArrayList<>(Collections.singletonList("strikes")); + public static ArrayList strikes_give = new ArrayList<>(Collections.singletonList("give")); + public static ArrayList strikes_info = new ArrayList<>(Collections.singletonList("info")); + public static ArrayList strikes_set = new ArrayList<>(Collections.singletonList("set")); + public static ArrayList strikes_take = new ArrayList<>(Collections.singletonList("take")); + public static ArrayList stuck = new ArrayList<>(Arrays.asList("stuck", "halp!")); + public static ArrayList tag = new ArrayList<>(Arrays.asList("tag", "rename")); + public static ArrayList title = new ArrayList<>(Collections.singletonList("title")); + public static ArrayList toggleAllianceChat = new ArrayList<>(Arrays.asList("tac", "ac", "togglealliancechat")); + public static ArrayList top = new ArrayList<>(Arrays.asList("t", "top")); + public static ArrayList tpBanner = new ArrayList<>(Collections.singletonList("tpbanner")); + public static ArrayList unban = new ArrayList<>(Collections.singletonList("unban")); + public static ArrayList upgrades = new ArrayList<>(Arrays.asList("upgrades", "upgrade")); + public static ArrayList vault = new ArrayList<>(Collections.singletonList("vault")); + public static ArrayList viewChest = new ArrayList<>(Arrays.asList("viewchest", "viewpv")); + private static transient Aliases i = new Aliases(); + public static void load() { + FactionsPlugin.getInstance().persist.loadOrSaveDefault(i, Aliases.class, "aliases"); + } +} diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdAHome.java b/src/main/java/com/massivecraft/factions/cmd/CmdAHome.java index a22d105b..980dd46d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdAHome.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdAHome.java @@ -14,7 +14,7 @@ public class CmdAHome extends FCommand { public CmdAHome() { super(); - this.aliases.add("ahome"); + this.aliases.addAll(Aliases.ahome); this.requiredArgs.add("player"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java b/src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java index 72c0935f..a18f77ed 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java @@ -20,10 +20,7 @@ public class CmdAdmin extends FCommand { public CmdAdmin() { super(); - this.aliases.add("admin"); - this.aliases.add("setadmin"); - this.aliases.add("leader"); - this.aliases.add("setleader"); + this.aliases.addAll(Aliases.admin); this.requiredArgs.add("player"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdAnnounce.java b/src/main/java/com/massivecraft/factions/cmd/CmdAnnounce.java index d0904793..633199e9 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdAnnounce.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdAnnounce.java @@ -18,8 +18,7 @@ public class CmdAnnounce extends FCommand { public CmdAnnounce() { super(); - this.aliases.add("ann"); - this.aliases.add("announce"); + this.aliases.addAll(Aliases.announce); this.requiredArgs.add("message"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdAutoHelp.java b/src/main/java/com/massivecraft/factions/cmd/CmdAutoHelp.java index 54802bb2..426f12f7 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdAutoHelp.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdAutoHelp.java @@ -13,9 +13,7 @@ public class CmdAutoHelp extends FCommand { */ public CmdAutoHelp() { - this.aliases.add("?"); - this.aliases.add("h"); - this.aliases.add("help"); + this.aliases.addAll(Aliases.help); this.setHelpShort(""); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdBan.java b/src/main/java/com/massivecraft/factions/cmd/CmdBan.java index 58d142ab..cda2880b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdBan.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdBan.java @@ -21,7 +21,7 @@ public class CmdBan extends FCommand { public CmdBan() { super(); - this.aliases.add("ban"); + this.aliases.addAll(Aliases.ban_ban); this.requiredArgs.add("target"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdBanlist.java b/src/main/java/com/massivecraft/factions/cmd/CmdBanlist.java index 47318af4..66bb79d5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdBanlist.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdBanlist.java @@ -19,9 +19,7 @@ public class CmdBanlist extends FCommand { public CmdBanlist() { super(); - this.aliases.add("banlist"); - this.aliases.add("bans"); - this.aliases.add("banl"); + this.aliases.addAll(Aliases.ban_banlist); this.optionalArgs.put("faction", "faction"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdBanner.java b/src/main/java/com/massivecraft/factions/cmd/CmdBanner.java index 1638ebd0..668e62e9 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdBanner.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdBanner.java @@ -19,8 +19,7 @@ public class CmdBanner extends FCommand { */ public CmdBanner() { - this.aliases.add("banner"); - this.aliases.add("warbanner"); + this.aliases.addAll(Aliases.banner); this.requirements = new CommandRequirements.Builder(Permission.BANNER).playerOnly().memberOnly().build(); } diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdBoom.java b/src/main/java/com/massivecraft/factions/cmd/CmdBoom.java index eea7645e..8bf5bf7a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdBoom.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdBoom.java @@ -12,9 +12,7 @@ public class CmdBoom extends FCommand { public CmdBoom() { super(); - this.aliases.add("noboom"); - this.aliases.add("explosions"); - this.aliases.add("toggleexplosions"); + this.aliases.addAll(Aliases.boom); //this.requiredArgs.add(""); this.optionalArgs.put("on/off", "flip"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdBypass.java b/src/main/java/com/massivecraft/factions/cmd/CmdBypass.java index 54b85f5f..272f06a2 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdBypass.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdBypass.java @@ -12,7 +12,7 @@ public class CmdBypass extends FCommand { public CmdBypass() { super(); - this.aliases.add("bypass"); + this.aliases.addAll(Aliases.bypass); //this.requiredArgs.add(""); this.optionalArgs.put("on/off", "flip"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdChat.java b/src/main/java/com/massivecraft/factions/cmd/CmdChat.java index 44c9cb46..f0b9f7dd 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdChat.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdChat.java @@ -16,8 +16,7 @@ public class CmdChat extends FCommand { public CmdChat() { super(); - this.aliases.add("c"); - this.aliases.add("chat"); + this.aliases.addAll(Aliases.chat); //this.requiredArgs.add(""); this.optionalArgs.put("mode", "next"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdChatSpy.java b/src/main/java/com/massivecraft/factions/cmd/CmdChatSpy.java index cd64de59..c4a0214c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdChatSpy.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdChatSpy.java @@ -12,7 +12,7 @@ public class CmdChatSpy extends FCommand { public CmdChatSpy() { super(); - this.aliases.add("chatspy"); + this.aliases.addAll(Aliases.chatspy); this.optionalArgs.put("on/off", "flip"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdCheckpoint.java b/src/main/java/com/massivecraft/factions/cmd/CmdCheckpoint.java index 98bed73a..b70ebb92 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdCheckpoint.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdCheckpoint.java @@ -13,9 +13,7 @@ public class CmdCheckpoint extends FCommand { public CmdCheckpoint() { super(); - this.aliases.add("checkp"); - this.aliases.add("checkpoint"); - this.aliases.add("cpoint"); + this.aliases.addAll(Aliases.checkpoint); this.optionalArgs.put("set", ""); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdColeader.java b/src/main/java/com/massivecraft/factions/cmd/CmdColeader.java index 95740d83..b4f707b9 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdColeader.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdColeader.java @@ -19,10 +19,7 @@ public class CmdColeader extends FCommand { public CmdColeader() { super(); - this.aliases.add("co"); - this.aliases.add("setcoleader"); - this.aliases.add("coleader"); - this.aliases.add("setco"); + this.aliases.addAll(Aliases.coleader); this.optionalArgs.put("player name", "name"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdConfig.java b/src/main/java/com/massivecraft/factions/cmd/CmdConfig.java index ea1a9824..1eb17592 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdConfig.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdConfig.java @@ -20,7 +20,7 @@ public class CmdConfig extends FCommand { public CmdConfig() { super(); - this.aliases.add("config"); + this.aliases.addAll(Aliases.config); this.requiredArgs.add("setting"); this.requiredArgs.add("value"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdConvert.java b/src/main/java/com/massivecraft/factions/cmd/CmdConvert.java index 9af4d05c..a985796c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdConvert.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdConvert.java @@ -14,7 +14,7 @@ public class CmdConvert extends FCommand { */ public CmdConvert() { - this.aliases.add("convert"); + this.aliases.addAll(Aliases.convert); this.requiredArgs.add("[MYSQL|JSON]"); this.requirements = new CommandRequirements.Builder(Permission.CONVERT) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdCoords.java b/src/main/java/com/massivecraft/factions/cmd/CmdCoords.java index 156e4dfd..c036bd0a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdCoords.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdCoords.java @@ -13,8 +13,7 @@ public class CmdCoords extends FCommand { public CmdCoords() { super(); - this.aliases.add("coords"); - this.aliases.add("coord"); + this.aliases.addAll(Aliases.coords); this.requirements = new CommandRequirements.Builder(Permission.COORD) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java b/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java index 78afdb8f..0529674c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdCreate.java @@ -25,7 +25,7 @@ public class CmdCreate extends FCommand { public CmdCreate() { super(); - this.aliases.add("create"); + this.aliases.addAll(Aliases.create); this.requiredArgs.add("faction tag"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java b/src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java index 3a171b78..ded77fea 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java @@ -20,8 +20,7 @@ public class CmdDeinvite extends FCommand { public CmdDeinvite() { super(); - this.aliases.add("deinvite"); - this.aliases.add("deinv"); + this.aliases.addAll(Aliases.deinvite); this.optionalArgs.put("player name", "name"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdDelFWarp.java b/src/main/java/com/massivecraft/factions/cmd/CmdDelFWarp.java index 152ef3a6..317b890d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdDelFWarp.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdDelFWarp.java @@ -13,9 +13,7 @@ public class CmdDelFWarp extends FCommand { public CmdDelFWarp() { super(); - this.aliases.add("delwarp"); - this.aliases.add("dw"); - this.aliases.add("deletewarp"); + this.aliases.addAll(Aliases.deletefwarp); this.requiredArgs.add("warp name"); this.requirements = new CommandRequirements.Builder(Permission.SETWARP) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdDescription.java b/src/main/java/com/massivecraft/factions/cmd/CmdDescription.java index 890152f9..6e7992a3 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdDescription.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdDescription.java @@ -18,8 +18,7 @@ public class CmdDescription extends FCommand { public CmdDescription() { super(); - this.aliases.add("desc"); - this.aliases.add("description"); + this.aliases.addAll(Aliases.description); this.requiredArgs.add("desc"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdDisband.java b/src/main/java/com/massivecraft/factions/cmd/CmdDisband.java index 7f3948fc..fa33c1f9 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdDisband.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdDisband.java @@ -26,7 +26,7 @@ public class CmdDisband extends FCommand { public CmdDisband() { super(); - this.aliases.add("disband"); + this.aliases.addAll(Aliases.disband); this.optionalArgs.put("faction tag", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdDiscord.java b/src/main/java/com/massivecraft/factions/cmd/CmdDiscord.java index bbdbd104..7e17dd0a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdDiscord.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdDiscord.java @@ -9,7 +9,7 @@ import java.util.Random; public class CmdDiscord extends FCommand { public CmdDiscord() { super(); - this.aliases.add("discord"); + this.aliases.addAll(Aliases.discord_discord); this.requirements = new CommandRequirements.Builder(Permission.DISCORD) .playerOnly() .build(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdDrain.java b/src/main/java/com/massivecraft/factions/cmd/CmdDrain.java index c57daf6e..a3621f51 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdDrain.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdDrain.java @@ -16,7 +16,7 @@ import java.text.DecimalFormat; */ public class CmdDrain extends FCommand{ public CmdDrain(){ - this.aliases.add("drain"); + this.aliases.addAll(Aliases.drain); this.requirements = new CommandRequirements.Builder(Permission.DRAIN) .playerOnly() .memberOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFGlobal.java b/src/main/java/com/massivecraft/factions/cmd/CmdFGlobal.java index c9f0d2b8..fcd410be 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFGlobal.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdFGlobal.java @@ -17,9 +17,7 @@ public class CmdFGlobal extends FCommand { public CmdFGlobal() { super(); - this.aliases.add("gchat"); - this.aliases.add("global"); - this.aliases.add("globalchat"); + this.aliases.addAll(Aliases.global); this.requirements = new CommandRequirements.Builder(Permission.GLOBALCHAT) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFWarp.java b/src/main/java/com/massivecraft/factions/cmd/CmdFWarp.java index 97a30cab..70a7b74e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFWarp.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdFWarp.java @@ -20,8 +20,7 @@ public class CmdFWarp extends FCommand { public CmdFWarp() { super(); - this.aliases.add("warp"); - this.aliases.add("warps"); + this.aliases.addAll(Aliases.warp); this.optionalArgs.put("warpname", "warpname"); this.optionalArgs.put("password", "password"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFly.java b/src/main/java/com/massivecraft/factions/cmd/CmdFly.java index f93cb9d5..43631d52 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFly.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdFly.java @@ -31,7 +31,7 @@ public class CmdFly extends FCommand { public CmdFly() { super(); - this.aliases.add("fly"); + this.aliases.addAll(Aliases.fly); this.optionalArgs.put("on/off", "flip"); this.requirements = new CommandRequirements.Builder(Permission.FLY) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFocus.java b/src/main/java/com/massivecraft/factions/cmd/CmdFocus.java index 15b1d032..f42cd893 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdFocus.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdFocus.java @@ -13,7 +13,7 @@ public class CmdFocus extends FCommand { */ public CmdFocus() { - aliases.add("focus"); + aliases.addAll(Aliases.focus); requiredArgs.add("player"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdGetVault.java b/src/main/java/com/massivecraft/factions/cmd/CmdGetVault.java index 9f450505..d2aab6d5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdGetVault.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdGetVault.java @@ -16,7 +16,7 @@ public class CmdGetVault extends FCommand { public CmdGetVault() { super(); - this.aliases.add("getvault"); + this.aliases.addAll(Aliases.getvault); this.requirements = new CommandRequirements.Builder(Permission.GETVAULT) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdHelp.java b/src/main/java/com/massivecraft/factions/cmd/CmdHelp.java index bdea22c2..f16c6b84 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdHelp.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdHelp.java @@ -21,9 +21,7 @@ public class CmdHelp extends FCommand { public CmdHelp() { super(); - this.aliases.add("help"); - this.aliases.add("h"); - this.aliases.add("?"); + this.aliases.addAll(Aliases.help); //this.requiredArgs.add(""); this.optionalArgs.put("page", "1"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdHome.java b/src/main/java/com/massivecraft/factions/cmd/CmdHome.java index 4033733d..e2b84cff 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdHome.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdHome.java @@ -26,7 +26,7 @@ public class CmdHome extends FCommand { public CmdHome() { super(); - this.aliases.add("home"); + this.aliases.addAll(Aliases.home); this.optionalArgs.put("faction", "yours"); this.requirements = new CommandRequirements.Builder(Permission.HOME) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdInspect.java b/src/main/java/com/massivecraft/factions/cmd/CmdInspect.java index 3fa8009d..a752e731 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdInspect.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdInspect.java @@ -11,9 +11,7 @@ public class CmdInspect extends FCommand { public CmdInspect() { super(); - this.aliases.add("inspect"); - this.aliases.add("ins"); - + this.aliases.addAll(Aliases.inspect); this.requirements = new CommandRequirements.Builder(Permission.INSPECT) .playerOnly() .memberOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdInventorySee.java b/src/main/java/com/massivecraft/factions/cmd/CmdInventorySee.java index e971aa85..53f1d1e6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdInventorySee.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdInventorySee.java @@ -23,8 +23,7 @@ public class CmdInventorySee extends FCommand { public CmdInventorySee() { super(); - this.aliases.add("invsee"); - this.aliases.add("inventorysee"); + this.aliases.addAll(Aliases.invsee); this.requiredArgs.add("member name"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdInvite.java b/src/main/java/com/massivecraft/factions/cmd/CmdInvite.java index 25092c6c..e27a0444 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdInvite.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdInvite.java @@ -19,8 +19,7 @@ public class CmdInvite extends FCommand { public CmdInvite() { super(); - this.aliases.add("invite"); - this.aliases.add("inv"); + this.aliases.addAll(Aliases.invite); this.requiredArgs.add("player name"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdJoin.java b/src/main/java/com/massivecraft/factions/cmd/CmdJoin.java index 6a91b481..272e7f95 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdJoin.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdJoin.java @@ -22,7 +22,7 @@ public class CmdJoin extends FCommand { public CmdJoin() { super(); - this.aliases.add("join"); + this.aliases.addAll(Aliases.join); this.requiredArgs.add("faction name"); this.optionalArgs.put("player", "you"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdKick.java b/src/main/java/com/massivecraft/factions/cmd/CmdKick.java index 4d67fee0..505bf8e5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdKick.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdKick.java @@ -24,7 +24,7 @@ public class CmdKick extends FCommand { public CmdKick() { super(); - this.aliases.add("kick"); + this.aliases.addAll(Aliases.kick); this.optionalArgs.put("player name", "player name"); this.requirements = new CommandRequirements.Builder(Permission.KICK) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdKillHolograms.java b/src/main/java/com/massivecraft/factions/cmd/CmdKillHolograms.java index cb79b398..adee3876 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdKillHolograms.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdKillHolograms.java @@ -11,7 +11,7 @@ public class CmdKillHolograms extends FCommand { public CmdKillHolograms() { super(); - this.aliases.add("killholos"); + this.aliases.addAll(Aliases.killholograms); this.requiredArgs.add("radius"); this.requirements = new CommandRequirements.Builder(Permission.KILLHOLOS) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdLeave.java b/src/main/java/com/massivecraft/factions/cmd/CmdLeave.java index 1672633a..d85523e3 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdLeave.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdLeave.java @@ -13,7 +13,7 @@ public class CmdLeave extends FCommand { public CmdLeave() { super(); - this.aliases.add("leave"); + this.aliases.addAll(Aliases.leave); this.requirements = new CommandRequirements.Builder(Permission.LEAVE) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdList.java b/src/main/java/com/massivecraft/factions/cmd/CmdList.java index cd854a59..49280bc6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdList.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdList.java @@ -22,8 +22,7 @@ public class CmdList extends FCommand { public CmdList() { super(); - this.aliases.add("list"); - this.aliases.add("ls"); + this.aliases.addAll(Aliases.list); // default values in case user has old config defaults[0] = "&e&m----------&r&e[ &2Faction List &9{pagenumber}&e/&9{pagecount} &e]&m----------"; diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdLock.java b/src/main/java/com/massivecraft/factions/cmd/CmdLock.java index e2ccbbca..c0f7863e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdLock.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdLock.java @@ -19,7 +19,7 @@ public class CmdLock extends FCommand { public CmdLock() { super(); - this.aliases.add("lock"); + this.aliases.addAll(Aliases.lock); this.optionalArgs.put("on/off", "flip"); this.requirements = new CommandRequirements.Builder(Permission.LOCK) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdLogins.java b/src/main/java/com/massivecraft/factions/cmd/CmdLogins.java index 27a6c887..2fe6e9a0 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdLogins.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdLogins.java @@ -11,10 +11,7 @@ public class CmdLogins extends FCommand { public CmdLogins() { super(); - this.aliases.add("login"); - this.aliases.add("logins"); - this.aliases.add("logout"); - this.aliases.add("logouts"); + this.aliases.addAll(Aliases.logins); this.requirements = new CommandRequirements.Builder(Permission.MONITOR_LOGINS) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdLookup.java b/src/main/java/com/massivecraft/factions/cmd/CmdLookup.java index a2be1121..5b9095a8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdLookup.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdLookup.java @@ -18,7 +18,7 @@ public class CmdLookup extends FCommand { public CmdLookup() { super(); - this.aliases.add("lookup"); + this.aliases.addAll(Aliases.lookup); this.requiredArgs.add("faction name"); this.requirements = new CommandRequirements.Builder(Permission.LOOKUP) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdLowPower.java b/src/main/java/com/massivecraft/factions/cmd/CmdLowPower.java index 228fc632..a63bad60 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdLowPower.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdLowPower.java @@ -13,7 +13,7 @@ public class CmdLowPower extends FCommand { public CmdLowPower() { super(); - this.aliases.add("lowpower"); + this.aliases.addAll(Aliases.lowPower); this.requirements = new CommandRequirements.Builder(Permission.POWER_ANY) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdMap.java b/src/main/java/com/massivecraft/factions/cmd/CmdMap.java index e0cd3234..b8cdcc2d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdMap.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdMap.java @@ -15,7 +15,7 @@ public class CmdMap extends FCommand { public CmdMap() { super(); - this.aliases.add("map"); + this.aliases.addAll(Aliases.map_map); this.optionalArgs.put("on/off", "once"); this.requirements = new CommandRequirements.Builder(Permission.MAP) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdMapHeight.java b/src/main/java/com/massivecraft/factions/cmd/CmdMapHeight.java index 6c754598..8fd9f556 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdMapHeight.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdMapHeight.java @@ -12,8 +12,7 @@ public class CmdMapHeight extends FCommand { public CmdMapHeight() { super(); - this.aliases.add("mapheight"); - this.aliases.add("mh"); + this.aliases.addAll(Aliases.map_height); this.optionalArgs.put("height", "height"); this.requirements = new CommandRequirements.Builder(Permission.MAPHEIGHT) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdMod.java b/src/main/java/com/massivecraft/factions/cmd/CmdMod.java index b25bfa2e..236ee0b3 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdMod.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdMod.java @@ -19,10 +19,7 @@ public class CmdMod extends FCommand { public CmdMod() { super(); - this.aliases.add("mod"); - this.aliases.add("setmod"); - this.aliases.add("officer"); - this.aliases.add("setofficer"); + this.aliases.addAll(Aliases.mod); this.optionalArgs.put("player name", "name"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdModifyPower.java b/src/main/java/com/massivecraft/factions/cmd/CmdModifyPower.java index 91b0cdab..7c0659d3 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdModifyPower.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdModifyPower.java @@ -13,10 +13,7 @@ public class CmdModifyPower extends FCommand { public CmdModifyPower() { super(); - this.aliases.add("pm"); - this.aliases.add("mp"); - this.aliases.add("modifypower"); - this.aliases.add("modpower"); + this.aliases.addAll(Aliases.modifyPower); this.requiredArgs.add("name"); this.requiredArgs.add("power"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdNear.java b/src/main/java/com/massivecraft/factions/cmd/CmdNear.java index b57a6323..8cf42a6f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdNear.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdNear.java @@ -16,8 +16,7 @@ public class CmdNear extends FCommand { public CmdNear() { super(); - this.aliases.add("near"); - this.aliases.add("nearby"); + this.aliases.addAll(Aliases.near); this.requirements = new CommandRequirements.Builder(Permission.NEAR) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdOpen.java b/src/main/java/com/massivecraft/factions/cmd/CmdOpen.java index 9f539ea7..c1417647 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdOpen.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdOpen.java @@ -16,7 +16,7 @@ public class CmdOpen extends FCommand { public CmdOpen() { super(); - this.aliases.add("open"); + this.aliases.addAll(Aliases.open); this.optionalArgs.put("yes/no", "flip"); this.requirements = new CommandRequirements.Builder(Permission.OPEN) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdOwner.java b/src/main/java/com/massivecraft/factions/cmd/CmdOwner.java index 13bb1a08..a1a8cde3 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdOwner.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdOwner.java @@ -14,7 +14,7 @@ public class CmdOwner extends FCommand { public CmdOwner() { super(); - this.aliases.add("owner"); + this.aliases.addAll(Aliases.owner_owner); this.optionalArgs.put("player name", "you"); this.requirements = new CommandRequirements.Builder(Permission.OWNER) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdOwnerList.java b/src/main/java/com/massivecraft/factions/cmd/CmdOwnerList.java index ec4163a2..4c22e3f6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdOwnerList.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdOwnerList.java @@ -15,7 +15,7 @@ public class CmdOwnerList extends FCommand { public CmdOwnerList() { super(); - this.aliases.add("ownerlist"); + this.aliases.addAll(Aliases.owner_list); this.requirements = new CommandRequirements.Builder(Permission.OWNERLIST) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSee.java b/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSee.java index f41ea8e6..3b7e6313 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSee.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSee.java @@ -12,8 +12,7 @@ public class CmdPaypalSee extends FCommand { */ public CmdPaypalSee() { - this.aliases.add("seepaypal"); - this.aliases.add("paypal"); + this.aliases.addAll(Aliases.paypal_see); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSet.java b/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSet.java index 13fefc9b..55747250 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSet.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPaypalSet.java @@ -13,7 +13,7 @@ public class CmdPaypalSet extends FCommand { */ public CmdPaypalSet() { - this.aliases.add("setpaypal"); + this.aliases.addAll(Aliases.paypal_set); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPeaceful.java b/src/main/java/com/massivecraft/factions/cmd/CmdPeaceful.java index a54b9e4b..bd50497e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPeaceful.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPeaceful.java @@ -14,7 +14,7 @@ public class CmdPeaceful extends FCommand { public CmdPeaceful() { super(); - this.aliases.add("peaceful"); + this.aliases.addAll(Aliases.peaceful); this.requiredArgs.add("faction tag"); this.requirements = new CommandRequirements.Builder(Permission.SET_PEACEFUL) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPerm.java b/src/main/java/com/massivecraft/factions/cmd/CmdPerm.java index e2bd9fa1..cbe6a436 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPerm.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPerm.java @@ -23,10 +23,7 @@ public class CmdPerm extends FCommand { public CmdPerm() { super(); - this.aliases.add("perm"); - this.aliases.add("perms"); - this.aliases.add("permission"); - this.aliases.add("permissions"); + this.aliases.addAll(Aliases.perm); this.optionalArgs.put("relation", "relation"); this.optionalArgs.put("action", "action"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPermanent.java b/src/main/java/com/massivecraft/factions/cmd/CmdPermanent.java index a98c1155..6223901f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPermanent.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPermanent.java @@ -16,7 +16,7 @@ public class CmdPermanent extends FCommand { public CmdPermanent() { super(); - this.aliases.add("permanent"); + this.aliases.addAll(Aliases.permanent_faction); this.requiredArgs.add("faction tag"); this.requirements = new CommandRequirements.Builder(Permission.SET_PERMANENT) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java b/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java index db413aac..c4719164 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPermanentPower.java @@ -13,7 +13,7 @@ public class CmdPermanentPower extends FCommand { public CmdPermanentPower() { super(); - this.aliases.add("permanentpower"); + this.aliases.addAll(Aliases.permanent_power); this.requiredArgs.add("faction"); this.requiredArgs.add("power"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPlayerTitleToggle.java b/src/main/java/com/massivecraft/factions/cmd/CmdPlayerTitleToggle.java index d29d88b6..c6b65e8b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPlayerTitleToggle.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPlayerTitleToggle.java @@ -7,7 +7,7 @@ import com.massivecraft.factions.zcore.util.TL; public class CmdPlayerTitleToggle extends FCommand { public CmdPlayerTitleToggle() { super(); - this.aliases.add("titles"); + this.aliases.addAll(Aliases.titles); this.requirements = new CommandRequirements.Builder(Permission.TOGGLE_TITLES) .build(); } diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPower.java b/src/main/java/com/massivecraft/factions/cmd/CmdPower.java index 35a17724..e51ad426 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPower.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPower.java @@ -13,8 +13,7 @@ public class CmdPower extends FCommand { public CmdPower() { super(); - this.aliases.add("power"); - this.aliases.add("pow"); + this.aliases.addAll(Aliases.power_power); this.optionalArgs.put("player name", "you"); this.requirements = new CommandRequirements.Builder(Permission.POWER) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdPowerBoost.java b/src/main/java/com/massivecraft/factions/cmd/CmdPowerBoost.java index e3215da7..e693a1f6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdPowerBoost.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdPowerBoost.java @@ -15,7 +15,7 @@ public class CmdPowerBoost extends FCommand { public CmdPowerBoost() { super(); - this.aliases.add("powerboost"); + this.aliases.addAll(Aliases.power_boost); this.requiredArgs.add("plugin|f|player|faction"); this.requiredArgs.add("name"); this.requiredArgs.add("# or reset"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdReload.java b/src/main/java/com/massivecraft/factions/cmd/CmdReload.java index 7c9d4b40..c74611b5 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdReload.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdReload.java @@ -16,7 +16,7 @@ public class CmdReload extends FCommand { public CmdReload() { super(); - this.aliases.add("reload"); + this.aliases.addAll(Aliases.reload); this.requirements = new CommandRequirements.Builder(Permission.RELOAD).build(); } diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdRules.java b/src/main/java/com/massivecraft/factions/cmd/CmdRules.java index cea02269..eec5aae1 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdRules.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdRules.java @@ -15,9 +15,7 @@ public class CmdRules extends FCommand { public CmdRules() { super(); - aliases.add("r"); - aliases.add("rule"); - aliases.add("rules"); + aliases.addAll(Aliases.rules); this.optionalArgs.put("add/remove/set/clear", ""); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSB.java b/src/main/java/com/massivecraft/factions/cmd/CmdSB.java index f111b975..1cb065f0 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSB.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSB.java @@ -11,8 +11,7 @@ public class CmdSB extends FCommand { */ public CmdSB() { - this.aliases.add("sb"); - this.aliases.add("scoreboard"); + this.aliases.addAll(Aliases.scoreboard); this.requirements = new CommandRequirements.Builder(Permission.SCOREBOARD) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSaveAll.java b/src/main/java/com/massivecraft/factions/cmd/CmdSaveAll.java index 0ba8151a..bd69fcc7 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSaveAll.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSaveAll.java @@ -13,8 +13,7 @@ public class CmdSaveAll extends FCommand { public CmdSaveAll() { super(); - this.aliases.add("saveall"); - this.aliases.add("save"); + this.aliases.addAll(Aliases.saveAll); this.requirements = new CommandRequirements.Builder(Permission.SAVE) .build(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSeeChunk.java b/src/main/java/com/massivecraft/factions/cmd/CmdSeeChunk.java index b098a689..f56ea15a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSeeChunk.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSeeChunk.java @@ -32,8 +32,7 @@ public class CmdSeeChunk extends FCommand { public CmdSeeChunk() { super(); - aliases.add("seechunk"); - aliases.add("sc"); + aliases.addAll(Aliases.seeChunk); this.useParticles = FactionsPlugin.getInstance().getConfig().getBoolean("see-chunk.particles", true); interval = FactionsPlugin.getInstance().getConfig().getLong("see-chunk.interval", 10L); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSeeDiscord.java b/src/main/java/com/massivecraft/factions/cmd/CmdSeeDiscord.java index 60c2685e..201f8d5f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSeeDiscord.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSeeDiscord.java @@ -12,8 +12,7 @@ public class CmdSeeDiscord extends FCommand{ */ public CmdSeeDiscord() { - this.aliases.add("seediscord"); - this.aliases.add("discord"); + this.aliases.addAll(Aliases.discord_see); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java b/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java index 787d7687..2f826f5f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSetBanner.java @@ -11,7 +11,7 @@ public class CmdSetBanner extends FCommand { public CmdSetBanner() { super(); - aliases.add("setbanner"); + aliases.addAll(Aliases.setBanner); this.requirements = new CommandRequirements.Builder(Permission.BANNER) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSetDefaultRole.java b/src/main/java/com/massivecraft/factions/cmd/CmdSetDefaultRole.java index 0edeeed4..148781f6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSetDefaultRole.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSetDefaultRole.java @@ -13,10 +13,7 @@ public class CmdSetDefaultRole extends FCommand { public CmdSetDefaultRole() { super(); - this.aliases.add("defaultrole"); - this.aliases.add("defaultrank"); - this.aliases.add("default"); - this.aliases.add("def"); + this.aliases.addAll(Aliases.setDefaultRole); this.requiredArgs.add("role"); this.requirements = new CommandRequirements.Builder(Permission.DEFAULTRANK) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSetDiscord.java b/src/main/java/com/massivecraft/factions/cmd/CmdSetDiscord.java index 9597878d..2060cefe 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSetDiscord.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSetDiscord.java @@ -14,7 +14,7 @@ public class CmdSetDiscord extends FCommand { public CmdSetDiscord(){ super(); - this.aliases.add("setdiscord"); + this.aliases.addAll(Aliases.discord_set); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSetFWarp.java b/src/main/java/com/massivecraft/factions/cmd/CmdSetFWarp.java index 01ac4222..02e80edd 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSetFWarp.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSetFWarp.java @@ -15,8 +15,7 @@ public class CmdSetFWarp extends FCommand { */ public CmdSetFWarp() { - this.aliases.add("setwarp"); - this.aliases.add("sw"); + this.aliases.addAll(Aliases.setWarp); this.requiredArgs.add("warp name"); this.optionalArgs.put("password", "password"); this.requirements = new CommandRequirements.Builder(Permission.SETWARP).playerOnly().memberOnly().withAction(PermissableAction.SETWARP).build(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSetMaxVaults.java b/src/main/java/com/massivecraft/factions/cmd/CmdSetMaxVaults.java index 9f873b57..25321163 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSetMaxVaults.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSetMaxVaults.java @@ -12,8 +12,7 @@ public class CmdSetMaxVaults extends FCommand { */ public CmdSetMaxVaults() { - this.aliases.add("setmaxvaults"); - this.aliases.add("smv"); + this.aliases.addAll(Aliases.setMaxVaults); this.requiredArgs.add("faction"); this.requiredArgs.add("number"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSethome.java b/src/main/java/com/massivecraft/factions/cmd/CmdSethome.java index cd567179..67b1c4e0 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSethome.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSethome.java @@ -12,7 +12,7 @@ public class CmdSethome extends FCommand { */ public CmdSethome() { - this.aliases.add("sethome"); + this.aliases.addAll(Aliases.setHome); this.optionalArgs.put("faction tag", "mine"); this.requirements = new CommandRequirements.Builder(Permission.SETHOME) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdShow.java b/src/main/java/com/massivecraft/factions/cmd/CmdShow.java index 517850d8..b87e0242 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdShow.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdShow.java @@ -21,8 +21,7 @@ public class CmdShow extends FCommand { List defaults = new ArrayList<>(); public CmdShow() { - this.aliases.add("show"); - this.aliases.add("who"); + this.aliases.addAll(Aliases.show_show); // add defaults to /f show in case config doesnt have it defaults.add("{header}"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdShowClaims.java b/src/main/java/com/massivecraft/factions/cmd/CmdShowClaims.java index 6f93f019..62f9f94d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdShowClaims.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdShowClaims.java @@ -13,8 +13,7 @@ public class CmdShowClaims extends FCommand { */ public CmdShowClaims() { - this.aliases.add("showclaims"); - this.aliases.add("showclaim"); + this.aliases.addAll(Aliases.show_claims); this.requirements = new CommandRequirements.Builder(Permission.SHOWCLAIMS) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdShowInvites.java b/src/main/java/com/massivecraft/factions/cmd/CmdShowInvites.java index dca72f0e..930b428e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdShowInvites.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdShowInvites.java @@ -17,7 +17,7 @@ public class CmdShowInvites extends FCommand { public CmdShowInvites() { super(); - aliases.add("showinvites"); + aliases.addAll(Aliases.show_invites); this.requirements = new CommandRequirements.Builder(Permission.SHOW_INVITES) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSpawnerLock.java b/src/main/java/com/massivecraft/factions/cmd/CmdSpawnerLock.java index 0c5eaeb2..11919247 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSpawnerLock.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSpawnerLock.java @@ -13,8 +13,7 @@ public class CmdSpawnerLock extends FCommand { public CmdSpawnerLock(){ super(); - this.aliases.add("lockspawners"); - this.aliases.add("spawnerlock"); + this.aliases.addAll(Aliases.spawnerlock); this.requirements = new CommandRequirements.Builder(Permission.LOCKSPAWNERS) .build(); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdStatus.java b/src/main/java/com/massivecraft/factions/cmd/CmdStatus.java index 01ce5913..a8ef978e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdStatus.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdStatus.java @@ -16,8 +16,7 @@ public class CmdStatus extends FCommand { public CmdStatus() { super(); - this.aliases.add("status"); - this.aliases.add("s"); + this.aliases.addAll(Aliases.status); this.requirements = new CommandRequirements.Builder(Permission.STATUS) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdStealth.java b/src/main/java/com/massivecraft/factions/cmd/CmdStealth.java index cecc011d..7ec4d12d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdStealth.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdStealth.java @@ -10,8 +10,7 @@ public class CmdStealth extends FCommand { */ public CmdStealth() { - this.aliases.add("ninja"); - this.aliases.add("stealth"); + this.aliases.addAll(Aliases.stealth); this.requirements = new CommandRequirements.Builder(Permission.STEALTH) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdStrikes.java b/src/main/java/com/massivecraft/factions/cmd/CmdStrikes.java index e4c1edc0..143563c4 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdStrikes.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdStrikes.java @@ -18,7 +18,7 @@ public class CmdStrikes extends FCommand { public CmdStrikes() { super(); - this.aliases.add("strikes"); + this.aliases.addAll(Aliases.strikes_strikes); this.addSubCommand(cmdStrikesGive); this.addSubCommand(cmdStrikesInfo); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdStrikesGive.java b/src/main/java/com/massivecraft/factions/cmd/CmdStrikesGive.java index ae5b9ae1..6c8fdcc1 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdStrikesGive.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdStrikesGive.java @@ -12,7 +12,7 @@ public class CmdStrikesGive extends FCommand { public CmdStrikesGive() { super(); - this.aliases.add("give"); + this.aliases.addAll(Aliases.strikes_give); this.requiredArgs.add(0, "faction"); this.requirements = new CommandRequirements.Builder(Permission.SETSTRIKES) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdStrikesInfo.java b/src/main/java/com/massivecraft/factions/cmd/CmdStrikesInfo.java index 8ac8b610..50068deb 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdStrikesInfo.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdStrikesInfo.java @@ -12,7 +12,7 @@ public class CmdStrikesInfo extends FCommand { public CmdStrikesInfo() { super(); - this.aliases.add("info"); + this.aliases.addAll(Aliases.strikes_info); this.optionalArgs.put("target", "faction"); this.requirements = new CommandRequirements.Builder(Permission.SETSTRIKES) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdStrikesSet.java b/src/main/java/com/massivecraft/factions/cmd/CmdStrikesSet.java index 8290791b..a1c82cd8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdStrikesSet.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdStrikesSet.java @@ -12,7 +12,7 @@ public class CmdStrikesSet extends FCommand { public CmdStrikesSet() { super(); - this.aliases.add("set"); + this.aliases.addAll(Aliases.strikes_set); this.requiredArgs.add(0, "faction"); this.requiredArgs.add(1, "amount"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdStrikesTake.java b/src/main/java/com/massivecraft/factions/cmd/CmdStrikesTake.java index ab5e7e6c..9f6b8fef 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdStrikesTake.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdStrikesTake.java @@ -12,7 +12,7 @@ public class CmdStrikesTake extends FCommand { public CmdStrikesTake() { super(); - this.aliases.add("take"); + this.aliases.addAll(Aliases.strikes_take); this.requiredArgs.add(0, "faction"); this.requiredArgs.add(1, "number of strikes"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdStuck.java b/src/main/java/com/massivecraft/factions/cmd/CmdStuck.java index 1fea1b20..4ace3a05 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdStuck.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdStuck.java @@ -19,8 +19,7 @@ public class CmdStuck extends FCommand { public CmdStuck() { super(); - this.aliases.add("stuck"); - this.aliases.add("halp!"); // halp!c: + this.aliases.addAll(Aliases.stuck); this.requirements = new CommandRequirements.Builder(Permission.STUCK) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdTag.java b/src/main/java/com/massivecraft/factions/cmd/CmdTag.java index 68337ab1..60b66c07 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdTag.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdTag.java @@ -20,8 +20,7 @@ public class CmdTag extends FCommand { */ public CmdTag() { - this.aliases.add("tag"); - this.aliases.add("rename"); + this.aliases.addAll(Aliases.tag); this.requiredArgs.add("faction tag"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdTitle.java b/src/main/java/com/massivecraft/factions/cmd/CmdTitle.java index 47090e96..1cdcc8da 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdTitle.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdTitle.java @@ -14,7 +14,7 @@ public class CmdTitle extends FCommand { */ public CmdTitle() { - this.aliases.add("title"); + this.aliases.addAll(Aliases.title); this.requiredArgs.add("player name"); this.optionalArgs.put("title", ""); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdToggleAllianceChat.java b/src/main/java/com/massivecraft/factions/cmd/CmdToggleAllianceChat.java index 4607f9f2..88ebf7be 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdToggleAllianceChat.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdToggleAllianceChat.java @@ -12,9 +12,7 @@ public class CmdToggleAllianceChat extends FCommand { public CmdToggleAllianceChat() { super(); - this.aliases.add("tac"); - this.aliases.add("togglealliancechat"); - this.aliases.add("ac"); + this.aliases.addAll(Aliases.toggleAllianceChat); this.requirements = new CommandRequirements.Builder(Permission.TOGGLE_ALLIANCE_CHAT) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdTop.java b/src/main/java/com/massivecraft/factions/cmd/CmdTop.java index fc25d03d..4149e85d 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdTop.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdTop.java @@ -18,8 +18,7 @@ public class CmdTop extends FCommand { public CmdTop() { super(); - this.aliases.add("top"); - this.aliases.add("t"); + this.aliases.addAll(Aliases.top); this.requiredArgs.add("criteria"); this.optionalArgs.put("page", "1"); diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdTpBanner.java b/src/main/java/com/massivecraft/factions/cmd/CmdTpBanner.java index 96739288..ed31762c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdTpBanner.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdTpBanner.java @@ -15,7 +15,7 @@ public class CmdTpBanner extends FCommand { public CmdTpBanner() { super(); - this.aliases.add("tpbanner"); + this.aliases.addAll(Aliases.tpBanner); this.requirements = new CommandRequirements.Builder(Permission.TPBANNER) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdUnban.java b/src/main/java/com/massivecraft/factions/cmd/CmdUnban.java index 54bd4b18..d9997ccc 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdUnban.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdUnban.java @@ -14,7 +14,7 @@ public class CmdUnban extends FCommand { public CmdUnban() { super(); - this.aliases.add("unban"); + this.aliases.addAll(Aliases.unban); this.requiredArgs.add("target"); this.requirements = new CommandRequirements.Builder(Permission.BAN) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdUpgrades.java b/src/main/java/com/massivecraft/factions/cmd/CmdUpgrades.java index 7f15bf8d..57203f6a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdUpgrades.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdUpgrades.java @@ -13,8 +13,7 @@ public class CmdUpgrades extends FCommand { public CmdUpgrades() { super(); - this.aliases.add("upgrades"); - this.aliases.add("upgrade"); + this.aliases.addAll(Aliases.upgrades); this.requirements = new CommandRequirements.Builder(Permission.UPGRADES) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdVault.java b/src/main/java/com/massivecraft/factions/cmd/CmdVault.java index f6f7015a..a8cec7ea 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdVault.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdVault.java @@ -18,7 +18,7 @@ public class CmdVault extends FCommand { */ public CmdVault() { - this.aliases.add("vault"); + this.aliases.addAll(Aliases.vault); this.requirements = new CommandRequirements.Builder(Permission.VAULT) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdViewChest.java b/src/main/java/com/massivecraft/factions/cmd/CmdViewChest.java index 90e7add7..2cd9b9eb 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdViewChest.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdViewChest.java @@ -13,8 +13,7 @@ public class CmdViewChest extends FCommand { public CmdViewChest() { super(); - this.aliases.add("viewchest"); - this.aliases.add("viewpv"); + this.aliases.addAll(Aliases.viewChest); this.requiredArgs.add("faction name"); diff --git a/src/main/java/com/massivecraft/factions/cmd/alts/CmdAlts.java b/src/main/java/com/massivecraft/factions/cmd/alts/CmdAlts.java index 18946d43..92d6705f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/alts/CmdAlts.java +++ b/src/main/java/com/massivecraft/factions/cmd/alts/CmdAlts.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.alts; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -20,10 +21,7 @@ public class CmdAlts extends FCommand { public CmdAlts() { super(); - - this.aliases.add("alts"); - this.aliases.add("alt"); - + this.aliases.addAll(Aliases.alts_alts); this.addSubCommand(this.cmdInviteAlt); this.addSubCommand(this.cmdAltsList); this.addSubCommand(this.cmdKickAlt); diff --git a/src/main/java/com/massivecraft/factions/cmd/alts/CmdAltsList.java b/src/main/java/com/massivecraft/factions/cmd/alts/CmdAltsList.java index 94c6a4b4..8c5a03c6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/alts/CmdAltsList.java +++ b/src/main/java/com/massivecraft/factions/cmd/alts/CmdAltsList.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd.alts; import com.google.common.base.Joiner; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -19,8 +20,7 @@ public class CmdAltsList extends FCommand { public CmdAltsList() { super(); - this.aliases.add("list"); - this.aliases.add("l"); + this.aliases.addAll(Aliases.alts_list); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/alts/CmdInviteAlt.java b/src/main/java/com/massivecraft/factions/cmd/alts/CmdInviteAlt.java index 1b879551..80ce2832 100644 --- a/src/main/java/com/massivecraft/factions/cmd/alts/CmdInviteAlt.java +++ b/src/main/java/com/massivecraft/factions/cmd/alts/CmdInviteAlt.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd.alts; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -24,7 +25,7 @@ public class CmdInviteAlt extends FCommand { public CmdInviteAlt() { super(); - this.aliases.add("invite"); + this.aliases.addAll(Aliases.alts_invite); this.requiredArgs.add("player name"); this.requirements = new CommandRequirements.Builder(Permission.INVITE) diff --git a/src/main/java/com/massivecraft/factions/cmd/alts/CmdKickAlt.java b/src/main/java/com/massivecraft/factions/cmd/alts/CmdKickAlt.java index eb04c077..5d613dd6 100644 --- a/src/main/java/com/massivecraft/factions/cmd/alts/CmdKickAlt.java +++ b/src/main/java/com/massivecraft/factions/cmd/alts/CmdKickAlt.java @@ -4,6 +4,7 @@ import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -26,7 +27,7 @@ public class CmdKickAlt extends FCommand { public CmdKickAlt(){ super(); - this.aliases.add("kick"); + this.aliases.addAll(Aliases.alts_kick); this.requiredArgs.add("player name"); this.requirements = new CommandRequirements.Builder(Permission.KICK) diff --git a/src/main/java/com/massivecraft/factions/cmd/audit/CmdAudit.java b/src/main/java/com/massivecraft/factions/cmd/audit/CmdAudit.java index 2c8252ef..0a14861b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/audit/CmdAudit.java +++ b/src/main/java/com/massivecraft/factions/cmd/audit/CmdAudit.java @@ -5,6 +5,7 @@ package com.massivecraft.factions.cmd.audit; */ import com.massivecraft.factions.Faction; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -16,9 +17,7 @@ public class CmdAudit extends FCommand { public CmdAudit() { super(); - this.aliases.add("audit"); - this.aliases.add("logs"); - this.aliases.add("log"); + this.aliases.addAll(Aliases.audit); this.requirements = new CommandRequirements.Builder(Permission.AUDIT) diff --git a/src/main/java/com/massivecraft/factions/cmd/check/CmdCheck.java b/src/main/java/com/massivecraft/factions/cmd/check/CmdCheck.java index 85bba205..79611207 100644 --- a/src/main/java/com/massivecraft/factions/cmd/check/CmdCheck.java +++ b/src/main/java/com/massivecraft/factions/cmd/check/CmdCheck.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.check; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -31,7 +32,7 @@ public class CmdCheck extends FCommand { public CmdCheck() { this.simpleDateFormat = new SimpleDateFormat(Conf.dateFormat); - this.aliases.add("check"); + this.aliases.addAll(Aliases.check); this.requiredArgs.add("walls/buffers/settings/leaderboard"); this.requirements = new CommandRequirements.Builder(Permission.CHECK) diff --git a/src/main/java/com/massivecraft/factions/cmd/check/CmdWeeWoo.java b/src/main/java/com/massivecraft/factions/cmd/check/CmdWeeWoo.java index d8d847f4..be4a0de8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/check/CmdWeeWoo.java +++ b/src/main/java/com/massivecraft/factions/cmd/check/CmdWeeWoo.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.check; import com.massivecraft.factions.Conf; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -16,7 +17,7 @@ public class CmdWeeWoo extends FCommand { */ public CmdWeeWoo() { - this.aliases.add("weewoo"); + this.aliases.addAll(Aliases.weewoo); this.requiredArgs.add("start/stop"); this.requirements = new CommandRequirements.Builder(Permission.CHECK) diff --git a/src/main/java/com/massivecraft/factions/cmd/chest/CmdChest.java b/src/main/java/com/massivecraft/factions/cmd/chest/CmdChest.java index 6c85c2db..74693320 100644 --- a/src/main/java/com/massivecraft/factions/cmd/chest/CmdChest.java +++ b/src/main/java/com/massivecraft/factions/cmd/chest/CmdChest.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.chest; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -15,8 +16,7 @@ public class CmdChest extends FCommand { */ public CmdChest() { - this.aliases.add("chest"); - this.aliases.add("pv"); + this.aliases.addAll(Aliases.chest); this.requirements = new CommandRequirements.Builder(Permission.CHEST) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdAutoClaim.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdAutoClaim.java index 7e562968..1efcf286 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdAutoClaim.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdAutoClaim.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd.claim; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -22,7 +23,7 @@ public class CmdAutoClaim extends FCommand { public CmdAutoClaim() { super(); - this.aliases.add("autoclaim"); + this.aliases.addAll(Aliases.claim_auto); //this.requiredArgs.add(""); this.optionalArgs.put("faction", "your"); diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaim.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaim.java index b986c13e..3a2fc00c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaim.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaim.java @@ -4,6 +4,7 @@ import com.massivecraft.factions.Conf; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -25,7 +26,7 @@ public class CmdClaim extends FCommand { public CmdClaim() { super(); - this.aliases.add("claim"); + this.aliases.addAll(Aliases.claim_claim); //this.requiredArgs.add(""); this.optionalArgs.put("radius", "1"); diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaimAt.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaimAt.java index 7cf7244f..83521ab3 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaimAt.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaimAt.java @@ -4,6 +4,7 @@ import com.massivecraft.factions.Board; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -21,7 +22,7 @@ public class CmdClaimAt extends FCommand { public CmdClaimAt() { super(); - this.aliases.add("claimat"); + this.aliases.addAll(Aliases.claim_at); this.requiredArgs.add("world"); this.requiredArgs.add("x"); diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaimLine.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaimLine.java index 1968808e..e689b50e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaimLine.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdClaimLine.java @@ -4,6 +4,7 @@ import com.massivecraft.factions.Conf; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -27,8 +28,7 @@ public class CmdClaimLine extends FCommand { public CmdClaimLine() { // Aliases - this.aliases.add("claimline"); - this.aliases.add("cl"); + this.aliases.addAll(Aliases.claim_line); // Args this.optionalArgs.put("amount", "1"); diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdCorner.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdCorner.java index 058551a8..2513556f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdCorner.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdCorner.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.claim; import com.massivecraft.factions.*; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -23,7 +24,7 @@ public class CmdCorner extends FCommand { */ public CmdCorner() { - this.aliases.add("corner"); + this.aliases.addAll(Aliases.claim_corner); this.requirements = new CommandRequirements.Builder(Permission.CORNER) diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdSafeunclaimall.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdSafeunclaimall.java index 4896ccca..e1749eb1 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdSafeunclaimall.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdSafeunclaimall.java @@ -4,6 +4,7 @@ import com.massivecraft.factions.Board; import com.massivecraft.factions.Conf; import com.massivecraft.factions.Factions; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -19,8 +20,7 @@ public class CmdSafeunclaimall extends FCommand { */ public CmdSafeunclaimall() { - this.aliases.add("safeunclaimall"); - this.aliases.add("safedeclaimall"); + this.aliases.addAll(Aliases.unclaim_all_safe); this.optionalArgs.put("world", "all"); this.requirements = new CommandRequirements.Builder(Permission.MANAGE_SAFE_ZONE) diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdUnclaim.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdUnclaim.java index 9c922f08..b08febb8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdUnclaim.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdUnclaim.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.claim; import com.massivecraft.factions.*; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -23,8 +24,7 @@ public class CmdUnclaim extends FCommand { */ public CmdUnclaim() { - this.aliases.add("unclaim"); - this.aliases.add("declaim"); + this.aliases.addAll(Aliases.unclaim_unclaim); this.optionalArgs.put("radius", "1"); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdUnclaimall.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdUnclaimall.java index c1274ead..0db8f70b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdUnclaimall.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdUnclaimall.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.claim; import com.massivecraft.factions.*; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -20,8 +21,7 @@ public class CmdUnclaimall extends FCommand { */ public CmdUnclaimall() { - this.aliases.add("unclaimall"); - this.aliases.add("declaimall"); + this.aliases.addAll(Aliases.unclaim_all_unsafe); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/claim/CmdWarunclaimall.java b/src/main/java/com/massivecraft/factions/cmd/claim/CmdWarunclaimall.java index 27834452..f2f0739e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/claim/CmdWarunclaimall.java +++ b/src/main/java/com/massivecraft/factions/cmd/claim/CmdWarunclaimall.java @@ -4,6 +4,7 @@ import com.massivecraft.factions.Board; import com.massivecraft.factions.Conf; import com.massivecraft.factions.Factions; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -19,8 +20,7 @@ public class CmdWarunclaimall extends FCommand { */ public CmdWarunclaimall() { - this.aliases.add("warunclaimall"); - this.aliases.add("wardeclaimall"); + this.aliases.addAll(Aliases.unclaim_all_war); this.optionalArgs.put("world", "all"); this.requirements = new CommandRequirements.Builder(Permission.MANAGE_WAR_ZONE) diff --git a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoney.java b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoney.java index 56b6629b..d86f52a7 100644 --- a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoney.java +++ b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoney.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.econ; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.FCommand; import com.massivecraft.factions.zcore.util.TL; @@ -21,8 +22,7 @@ public class CmdMoney extends FCommand { public CmdMoney() { super(); - this.aliases.add("money"); - this.aliases.add("bank"); + this.aliases.addAll(Aliases.money_money); //this.requiredArgs.add(""); //this.optionalArgs.put("","") diff --git a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyBalance.java b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyBalance.java index b6f95b66..b5f43548 100644 --- a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyBalance.java +++ b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyBalance.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.econ; import com.massivecraft.factions.Faction; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -17,8 +18,7 @@ public class CmdMoneyBalance extends FCommand { public CmdMoneyBalance() { super(); - this.aliases.add("b"); - this.aliases.add("balance"); + this.aliases.addAll(Aliases.money_balance); //this.requiredArgs.add(""); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyDeposit.java b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyDeposit.java index da445979..c46c3b4b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyDeposit.java +++ b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyDeposit.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.econ; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -21,8 +22,7 @@ public class CmdMoneyDeposit extends FCommand { public CmdMoneyDeposit() { super(); - this.aliases.add("d"); - this.aliases.add("deposit"); + this.aliases.addAll(Aliases.money_deposit); this.requiredArgs.add("amount"); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferFf.java b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferFf.java index 548e1a51..c5cd0fdd 100644 --- a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferFf.java +++ b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferFf.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.econ; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -20,7 +21,7 @@ public class CmdMoneyTransferFf extends FCommand { */ public CmdMoneyTransferFf() { - this.aliases.add("ff"); + this.aliases.addAll(Aliases.money_transfer_Ff); this.requiredArgs.add("amount"); this.requiredArgs.add("faction"); diff --git a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferFp.java b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferFp.java index 878a8368..ec8fd6c7 100644 --- a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferFp.java +++ b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferFp.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.econ; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -19,7 +20,7 @@ public class CmdMoneyTransferFp extends FCommand { */ public CmdMoneyTransferFp() { - this.aliases.add("fp"); + this.aliases.addAll(Aliases.money_transfer_Fp); this.requiredArgs.add("amount"); this.requiredArgs.add("faction"); diff --git a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferPf.java b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferPf.java index 74c422b9..6d0072ce 100644 --- a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferPf.java +++ b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyTransferPf.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.econ; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -19,7 +20,7 @@ public class CmdMoneyTransferPf extends FCommand { */ public CmdMoneyTransferPf() { - this.aliases.add("pf"); + this.aliases.addAll(Aliases.money_transfer_Pf); this.requiredArgs.add("amount"); this.requiredArgs.add("player"); diff --git a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyWithdraw.java b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyWithdraw.java index ddedd8ab..79768e28 100644 --- a/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyWithdraw.java +++ b/src/main/java/com/massivecraft/factions/cmd/econ/CmdMoneyWithdraw.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd.econ; import com.massivecraft.factions.Conf; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -25,8 +26,7 @@ public class CmdMoneyWithdraw extends FCommand { */ public CmdMoneyWithdraw() { - this.aliases.add("w"); - this.aliases.add("withdraw"); + this.aliases.addAll(Aliases.money_withdraw); this.requiredArgs.add("amount"); this.optionalArgs.put("faction", "yours"); diff --git a/src/main/java/com/massivecraft/factions/cmd/grace/CmdGrace.java b/src/main/java/com/massivecraft/factions/cmd/grace/CmdGrace.java index 94afba1b..29a4e3f7 100644 --- a/src/main/java/com/massivecraft/factions/cmd/grace/CmdGrace.java +++ b/src/main/java/com/massivecraft/factions/cmd/grace/CmdGrace.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.grace; import com.massivecraft.factions.Conf; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -16,7 +17,7 @@ public class CmdGrace extends FCommand { public CmdGrace() { super(); - this.aliases.add("grace"); + this.aliases.addAll(Aliases.grace); this.requirements = new CommandRequirements.Builder(Permission.GRACE) .build(); diff --git a/src/main/java/com/massivecraft/factions/cmd/logout/CmdLogout.java b/src/main/java/com/massivecraft/factions/cmd/logout/CmdLogout.java index e1ed15c4..d6520d42 100644 --- a/src/main/java/com/massivecraft/factions/cmd/logout/CmdLogout.java +++ b/src/main/java/com/massivecraft/factions/cmd/logout/CmdLogout.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.logout; import com.massivecraft.factions.Conf; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -11,7 +12,7 @@ public class CmdLogout extends FCommand { public CmdLogout() { super(); - this.aliases.add("logout"); + this.aliases.addAll(Aliases.logout); this.requirements = new CommandRequirements.Builder(Permission.LOGOUT) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/points/CmdPoints.java b/src/main/java/com/massivecraft/factions/cmd/points/CmdPoints.java index fa8ae079..6e8f2e51 100644 --- a/src/main/java/com/massivecraft/factions/cmd/points/CmdPoints.java +++ b/src/main/java/com/massivecraft/factions/cmd/points/CmdPoints.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.points; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -19,7 +20,7 @@ public class CmdPoints extends FCommand { public CmdPoints() { super(); - this.aliases.add("points"); + this.aliases.addAll(Aliases.points_points); this.requirements = new CommandRequirements.Builder(Permission.POINTS) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsAdd.java b/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsAdd.java index 032612ff..30b16b1b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsAdd.java +++ b/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsAdd.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd.points; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; import com.massivecraft.factions.Factions; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -17,7 +18,7 @@ public class CmdPointsAdd extends FCommand { public CmdPointsAdd() { super(); - this.aliases.add("add"); + this.aliases.addAll(Aliases.points_add); this.requiredArgs.add("faction/player"); this.requiredArgs.add("# of points"); diff --git a/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsRemove.java b/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsRemove.java index 3415f28a..bdb0c7e1 100644 --- a/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsRemove.java +++ b/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsRemove.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd.points; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; import com.massivecraft.factions.Factions; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -17,7 +18,7 @@ public class CmdPointsRemove extends FCommand { public CmdPointsRemove() { super(); - this.aliases.add("remove"); + this.aliases.addAll(Aliases.points_remove); this.requiredArgs.add("faction/player"); this.requiredArgs.add("# of points"); diff --git a/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsSet.java b/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsSet.java index dbcfd190..5ab56069 100644 --- a/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsSet.java +++ b/src/main/java/com/massivecraft/factions/cmd/points/CmdPointsSet.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd.points; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; import com.massivecraft.factions.Factions; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -17,7 +18,7 @@ public class CmdPointsSet extends FCommand { public CmdPointsSet() { super(); - this.aliases.add("set"); + this.aliases.addAll(Aliases.points_set); this.requiredArgs.add("faction/player"); this.requiredArgs.add("# of points"); diff --git a/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationAlly.java b/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationAlly.java index e668f683..bb4b1f76 100644 --- a/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationAlly.java +++ b/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationAlly.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd.relational; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.struct.Relation; public class CmdRelationAlly extends FRelationCommand { @@ -9,7 +10,7 @@ public class CmdRelationAlly extends FRelationCommand { */ public CmdRelationAlly() { - aliases.add("ally"); + aliases.addAll(Aliases.relation_ally); targetRelation = Relation.ALLY; } } diff --git a/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationEnemy.java b/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationEnemy.java index bf3e5eec..7be52fca 100644 --- a/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationEnemy.java +++ b/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationEnemy.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd.relational; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.struct.Relation; public class CmdRelationEnemy extends FRelationCommand { @@ -9,7 +10,7 @@ public class CmdRelationEnemy extends FRelationCommand { */ public CmdRelationEnemy() { - aliases.add("enemy"); + aliases.addAll(Aliases.relation_enemy); targetRelation = Relation.ENEMY; } } diff --git a/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationNeutral.java b/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationNeutral.java index 7c405e22..5b8315b7 100644 --- a/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationNeutral.java +++ b/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationNeutral.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd.relational; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.struct.Relation; public class CmdRelationNeutral extends FRelationCommand { @@ -9,7 +10,7 @@ public class CmdRelationNeutral extends FRelationCommand { */ public CmdRelationNeutral() { - aliases.add("neutral"); + aliases.addAll(Aliases.relation_neutral); targetRelation = Relation.NEUTRAL; } } diff --git a/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationTruce.java b/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationTruce.java index 239be0f9..918b773f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationTruce.java +++ b/src/main/java/com/massivecraft/factions/cmd/relational/CmdRelationTruce.java @@ -1,5 +1,6 @@ package com.massivecraft.factions.cmd.relational; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.struct.Relation; public class CmdRelationTruce extends FRelationCommand { @@ -9,7 +10,7 @@ public class CmdRelationTruce extends FRelationCommand { */ public CmdRelationTruce() { - aliases.add("truce"); + aliases.addAll(Aliases.relation_truce); targetRelation = Relation.TRUCE; } } diff --git a/src/main/java/com/massivecraft/factions/cmd/reserve/CmdReserve.java b/src/main/java/com/massivecraft/factions/cmd/reserve/CmdReserve.java index 2ffd997d..1aec43ba 100644 --- a/src/main/java/com/massivecraft/factions/cmd/reserve/CmdReserve.java +++ b/src/main/java/com/massivecraft/factions/cmd/reserve/CmdReserve.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.reserve; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -14,7 +15,7 @@ import com.massivecraft.factions.zcore.util.TL; public class CmdReserve extends FCommand { public CmdReserve() { - this.aliases.add("reserve"); + this.aliases.addAll(Aliases.reserve); this.requiredArgs.add("tag"); this.requiredArgs.add("player"); this.requirements = new CommandRequirements.Builder( diff --git a/src/main/java/com/massivecraft/factions/cmd/roles/CmdDemote.java b/src/main/java/com/massivecraft/factions/cmd/roles/CmdDemote.java index f788ca67..035e3c3e 100644 --- a/src/main/java/com/massivecraft/factions/cmd/roles/CmdDemote.java +++ b/src/main/java/com/massivecraft/factions/cmd/roles/CmdDemote.java @@ -1,5 +1,7 @@ package com.massivecraft.factions.cmd.roles; +import com.massivecraft.factions.cmd.Aliases; + public class CmdDemote extends FPromoteCommand { /** @@ -7,7 +9,7 @@ public class CmdDemote extends FPromoteCommand { */ public CmdDemote() { - aliases.add("demote"); + aliases.addAll(Aliases.roles_demote); this.relative = -1; } } diff --git a/src/main/java/com/massivecraft/factions/cmd/roles/CmdPromote.java b/src/main/java/com/massivecraft/factions/cmd/roles/CmdPromote.java index e5821c00..88eb2f4c 100644 --- a/src/main/java/com/massivecraft/factions/cmd/roles/CmdPromote.java +++ b/src/main/java/com/massivecraft/factions/cmd/roles/CmdPromote.java @@ -1,5 +1,7 @@ package com.massivecraft.factions.cmd.roles; +import com.massivecraft.factions.cmd.Aliases; + public class CmdPromote extends FPromoteCommand { /** @@ -7,8 +9,7 @@ public class CmdPromote extends FPromoteCommand { */ public CmdPromote() { - aliases.add("promote"); - aliases.add("promo"); + aliases.addAll(Aliases.roles_promote); this.relative = 1; } } 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 3b0ae067..962b6a0a 100644 --- a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTnt.java +++ b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTnt.java @@ -1,6 +1,7 @@ package com.massivecraft.factions.cmd.tnt; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -22,7 +23,7 @@ public class CmdTnt extends FCommand { public CmdTnt() { super(); - this.aliases.add("tnt"); + this.aliases.addAll(Aliases.tnt_tnt); this.optionalArgs.put("add/take/addall", ""); this.optionalArgs.put("amount", "number"); diff --git a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java index 4a106d0d..f8a44d1b 100644 --- a/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java +++ b/src/main/java/com/massivecraft/factions/cmd/tnt/CmdTntFill.java @@ -2,6 +2,7 @@ package com.massivecraft.factions.cmd.tnt; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -28,7 +29,7 @@ public class CmdTntFill extends FCommand { public CmdTntFill() { super(); - this.aliases.add("tntfill"); + this.aliases.addAll(Aliases.tnt_tntfill); this.requiredArgs.add("radius"); this.requiredArgs.add("amount"); @@ -110,7 +111,7 @@ public class CmdTntFill extends FCommand { } // Take TNT from the bank. - removeFromBank(context, getFactionTnt); + context.faction.takeTnt(getFactionTnt); } fillDispensers(context.fPlayer, opDispensers, amount); // Remove used TNT from player inventory. @@ -119,8 +120,9 @@ public class CmdTntFill extends FCommand { // Actually fill every dispenser with the precise amount. private void fillDispensers(FPlayer fPlayer, List dispensers, int count) { for (Dispenser dispenser : dispensers) { - takeTnt(fPlayer, count); - dispenser.getInventory().addItem(new ItemStack(Material.TNT, count)); + if (takeTnt(fPlayer, count)) { + dispenser.getInventory().addItem(new ItemStack(Material.TNT, count)); + } else {return;} } } @@ -161,7 +163,7 @@ public class CmdTntFill extends FCommand { context.player.updateInventory(); } - private void takeTnt(FPlayer fme, int amount) { + private boolean takeTnt(FPlayer fme, int amount) { Inventory inv = fme.getPlayer().getInventory(); int invTnt = 0; for (int i = 0; i <= inv.getSize(); i++) { @@ -174,14 +176,15 @@ public class CmdTntFill extends FCommand { } if (amount > invTnt) { fme.msg(TL.COMMAND_TNTFILL_NOTENOUGH.toString()); - return; + return false; } ItemStack tnt = new ItemStack(Material.TNT, amount); - if (fme.getFaction().getTnt() + amount > FactionsPlugin.instance.getConfig().getInt("ftnt.Bank-Limit")) { + if (fme.getFaction().getTnt() + amount > FactionsPlugin.getInstance().getConfig().getInt("ftnt.Bank-Limit")) { fme.msg(TL.COMMAND_TNT_EXCEEDLIMIT.toString()); - return; + return false; } removeFromInventory(fme.getPlayer().getInventory(), tnt); + return true; } // Counts the item type available in the inventory. diff --git a/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java b/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java index f8dd3d60..42b48519 100644 --- a/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java +++ b/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java @@ -5,6 +5,7 @@ import com.massivecraft.factions.Board; import com.massivecraft.factions.FLocation; import com.massivecraft.factions.FPlayers; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.cmd.Aliases; import com.massivecraft.factions.cmd.CommandContext; import com.massivecraft.factions.cmd.CommandRequirements; import com.massivecraft.factions.cmd.FCommand; @@ -28,7 +29,7 @@ public class CmdWild extends FCommand { public static HashSet teleporting; public CmdWild() { super(); - this.aliases.add("wild"); + this.aliases.addAll(Aliases.wild); this.requirements = new CommandRequirements.Builder(Permission.WILD) .playerOnly() .build(); diff --git a/src/main/java/com/massivecraft/factions/discord/Discord.java b/src/main/java/com/massivecraft/factions/discord/Discord.java index 7f680bd4..38cc0f5e 100644 --- a/src/main/java/com/massivecraft/factions/discord/Discord.java +++ b/src/main/java/com/massivecraft/factions/discord/Discord.java @@ -4,6 +4,7 @@ import com.massivecraft.factions.Conf; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FactionsPlugin; +import com.massivecraft.factions.util.exceptions.SaberException; import net.dv8tion.jda.core.AccountType; import net.dv8tion.jda.core.JDA; import net.dv8tion.jda.core.JDABuilder; @@ -77,7 +78,11 @@ public class Discord { try { confUseDiscord = Conf.useDiscordSystem; botToken = Conf.discordBotToken; - if (jda != null) {mainGuild = jda.getGuildById(Conf.mainGuildID);} else {mainGuild = null;} + if (jda != null && Conf.leaderRoles || Conf.factionDiscordTags) { + mainGuild = jda.getGuildById(Conf.mainGuildID); + } else { + mainGuild = null; + } mainGuildID = Conf.mainGuildID; useDiscord = !botToken.equals("") && !mainGuildID.equals("") && confUseDiscord; roleColor = new java.awt.Color(Conf.factionRoleColor.get(0), Conf.factionRoleColor.get(1), Conf.factionRoleColor.get(2)); @@ -93,7 +98,6 @@ public class Discord { if (mainGuild != null) {leader = mainGuild.getRoleById(Conf.leaderRole);} else {leader = null;} } else {useEmotes = false; leader = null;} } catch (NullPointerException e) { - e.printStackTrace(); setupLog.add(new DiscordSetupAttempt("Threw an NPE while setting up variables", System.currentTimeMillis())); } } From a71bbd5b144dd95307130280aa0190e82d90ae97 Mon Sep 17 00:00:00 2001 From: DroppingAnvil Date: Wed, 1 Jan 2020 20:04:02 -0600 Subject: [PATCH 2/2] remove unused import. --- pom.xml | 2 +- src/main/java/com/massivecraft/factions/cmd/Aliases.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 251f52bd..c3b0b903 100644 --- a/pom.xml +++ b/pom.xml @@ -104,7 +104,7 @@ org.spigotmc - spigot-api + spigot 1.15.1-R0.1-SNAPSHOT provided diff --git a/src/main/java/com/massivecraft/factions/cmd/Aliases.java b/src/main/java/com/massivecraft/factions/cmd/Aliases.java index 2b9d6a3f..dd6bde4f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/Aliases.java +++ b/src/main/java/com/massivecraft/factions/cmd/Aliases.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.Conf; import com.massivecraft.factions.FactionsPlugin; import java.util.ArrayList;