From 3d997bbf1616dcf25f05e16c7a7f37e2e87463f8 Mon Sep 17 00:00:00 2001 From: DroppingAnvil Date: Wed, 25 Mar 2020 13:35:50 -0500 Subject: [PATCH] Few minor changes --- src/main/java/com/massivecraft/factions/Conf.java | 3 +-- src/main/java/com/massivecraft/factions/FactionsPlugin.java | 1 + src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java | 2 +- src/main/java/com/massivecraft/factions/duels/Duel.java | 2 ++ src/main/java/com/massivecraft/factions/duels/Duels.java | 4 ++-- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/Conf.java b/src/main/java/com/massivecraft/factions/Conf.java index bd1e2d73..e55f779c 100644 --- a/src/main/java/com/massivecraft/factions/Conf.java +++ b/src/main/java/com/massivecraft/factions/Conf.java @@ -22,7 +22,7 @@ public class Conf { public static final transient double DYNMAP_STYLE_FILL_OPACITY = 0.35D; public static final transient String DYNMAP_STYLE_HOME_MARKER = "greenflag"; public static final transient boolean DYNMAP_STYLE_BOOST = false; - public static List baseCommandAliases = new ArrayList<>(); + public static List baseCommandAliases = new ArrayList<>(Collections.singletonList("f")); public static boolean allowNoSlashCommand = true; // Colors @@ -411,7 +411,6 @@ public class Conf { } static { - baseCommandAliases.add("f"); blacklistedFactionNames.add("somenamehere"); diff --git a/src/main/java/com/massivecraft/factions/FactionsPlugin.java b/src/main/java/com/massivecraft/factions/FactionsPlugin.java index 84b3acf3..986433e6 100755 --- a/src/main/java/com/massivecraft/factions/FactionsPlugin.java +++ b/src/main/java/com/massivecraft/factions/FactionsPlugin.java @@ -202,6 +202,7 @@ public class FactionsPlugin extends MPlugin { divider(); return; } + //TODO fix this //Update their config if needed // Updater.updateIfNeeded(getConfig()); RegisteredServiceProvider rsp = FactionsPlugin.this.getServer().getServicesManager().getRegistration(Economy.class); 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 ee0498cb..92ebca1f 100644 --- a/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java +++ b/src/main/java/com/massivecraft/factions/cmd/wild/CmdWild.java @@ -34,7 +34,7 @@ public class CmdWild extends FCommand implements WaitedTask { public CmdWild() { super(); - if (this.instance == null) instance = this; + if (instance == null) instance = this; this.aliases.addAll(Aliases.wild); this.requirements = new CommandRequirements.Builder(Permission.WILD) .playerOnly() diff --git a/src/main/java/com/massivecraft/factions/duels/Duel.java b/src/main/java/com/massivecraft/factions/duels/Duel.java index f35acfda..c33c163e 100644 --- a/src/main/java/com/massivecraft/factions/duels/Duel.java +++ b/src/main/java/com/massivecraft/factions/duels/Duel.java @@ -99,6 +99,8 @@ public class Duel { Duels.duel = new Duel(fvf.getKey(), fvf.getValue()); Duels.preparingDuel = true; Duels.acceptedDuel.clear(); + Duels.sendRequests(faction1); + Duels.sendRequests(faction2); } } diff --git a/src/main/java/com/massivecraft/factions/duels/Duels.java b/src/main/java/com/massivecraft/factions/duels/Duels.java index 7b7eb345..bd0ca274 100644 --- a/src/main/java/com/massivecraft/factions/duels/Duels.java +++ b/src/main/java/com/massivecraft/factions/duels/Duels.java @@ -60,8 +60,8 @@ public class Duels { return new Location(Bukkit.getWorld(locKeyArray[0]), Double.parseDouble(locKeyArray[1]), Double.parseDouble(locKeyArray[2]), Double.parseDouble(locKeyArray[3])); } - public void sendRequests() { - for (FPlayer fplayer : duel.getFaction1().getFPlayers()) { + public static void sendRequests(Faction faction) { + for (FPlayer fplayer : faction.getFPlayers()) { if (fplayer.isOnline()) { fplayer.getPlayer().openInventory(RequestGUI.inv); guiMap.put(fplayer, System.currentTimeMillis());