Started to implement special faction behavior

This commit is contained in:
Olof Larsson
2011-10-24 02:33:30 +02:00
parent e3821a8d4e
commit 46161f61db
21 changed files with 179 additions and 116 deletions

View File

@ -9,7 +9,7 @@ import com.massivecraft.factions.Conf;
*
* The flags are either true or false.
*/
public enum FactionFlag
public enum FFlag
{
// Faction flags
PERMANENT("permanent", "<i>A permanent faction will never be deleted.", false, false),
@ -33,7 +33,7 @@ public enum FactionFlag
public final boolean defaultDefaultValue;
public final boolean defaultDefaultChangeable;
private FactionFlag(final String nicename, final String desc, final boolean defaultDefaultValue, final boolean defaultDefaultChangeable)
private FFlag(final String nicename, final String desc, final boolean defaultDefaultValue, final boolean defaultDefaultChangeable)
{
this.nicename = nicename;
this.desc = desc;
@ -73,7 +73,7 @@ public enum FactionFlag
return ret;
}
public static FactionFlag parse(String str)
public static FFlag parse(String str)
{
str = str.toLowerCase();
if (str.startsWith("per")) return PERMANENT;

View File

@ -81,7 +81,7 @@ public enum FPerm
{
rels.add("<p>"+rel.nicename);
}
ret += TextUtil.implode(rels, "<c> + ");
ret += TextUtil.implode(rels, "<c>+");
if (withDesc)
{
@ -125,7 +125,7 @@ public enum FPerm
return ret;
}
private static final String errorpattern = "<b>%s can't <h>%s<b> in the territory of %s<b>.";
private static final String errorpattern = "<b>%s<b> can't %s in the territory of %s<b>.";
public boolean has(RelationParticipator testSubject, FLocation floc, boolean informIfNot)
{
Faction factionThere = Board.getFactionAt(floc);