From 2900bf372f5ebedd0919107bd7d0e04a6ca61b83 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 3 Aug 2011 21:49:11 -0500 Subject: [PATCH] changed findFactions() method to try matching faction tags before trying to match player names, instead of the other way around --- src/com/massivecraft/factions/Factions.java | 2 +- .../factions/commands/FBaseCommand.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/com/massivecraft/factions/Factions.java b/src/com/massivecraft/factions/Factions.java index 40403d3e..0423d0c6 100644 --- a/src/com/massivecraft/factions/Factions.java +++ b/src/com/massivecraft/factions/Factions.java @@ -208,7 +208,7 @@ public class Factions extends JavaPlugin { Permissions = ((Permissions)test).getHandler(); Factions.log("Found and will use plugin "+((Permissions)test).getDescription().getFullName()); } else { - Factions.log("Permission system not detected, defaulting to OP"); + Factions.log("Permissions plugin not detected, defaulting to Bukkit superperms system"); } } diff --git a/src/com/massivecraft/factions/commands/FBaseCommand.java b/src/com/massivecraft/factions/commands/FBaseCommand.java index c97667ad..5f338f89 100644 --- a/src/com/massivecraft/factions/commands/FBaseCommand.java +++ b/src/com/massivecraft/factions/commands/FBaseCommand.java @@ -190,17 +190,17 @@ public class FBaseCommand { public Faction findFaction(String factionName, boolean defaultToMine) { - // First we search player names - FPlayer fp = FPlayer.find(factionName); - if (fp != null) { - return fp.getFaction(); - } - - // Secondly we search faction names + // First we search faction names Faction faction = Faction.findByTag(factionName); if (faction != null) { return faction; } + + // Next we search player names + FPlayer fp = FPlayer.find(factionName); + if (fp != null) { + return fp.getFaction(); + } if (defaultToMine && sender instanceof Player) { return me.getFaction();