Add recruit role for factions

The recruit role's goal is to enable factions to invite new members without being afraid of getting griefed instantly.

Adds a configuration option "factionRankDefault" for default rank of newly joined faction members. By default this is RECRUIT, but it can be set to any supported rank.

Adds the /f promote and /f demote commands, which leaders and officers can use to increase or decrease the rank of a faction member by one level, up to officer, or down to recruit.
This version of the recruit feature preserves the /f officer command for backward compatibility.
This commit is contained in:
Justin Kaeser
2013-01-06 21:44:29 +01:00
parent 755a957b12
commit 4743c1821a
13 changed files with 208 additions and 31 deletions

View File

@@ -49,6 +49,7 @@ public class CmdShow extends FCommand
Collection<FPlayer> admins = faction.getFPlayersWhereRole(Rel.LEADER);
Collection<FPlayer> mods = faction.getFPlayersWhereRole(Rel.OFFICER);
Collection<FPlayer> normals = faction.getFPlayersWhereRole(Rel.MEMBER);
Collection<FPlayer> recruits = faction.getFPlayersWhereRole(Rel.RECRUIT);
msg(p.txt.titleize(faction.getTag(fme)));
msg("<a>Description: <i>%s", faction.getDescription());
@@ -147,6 +148,17 @@ public class CmdShow extends FCommand
}
}
for (FPlayer follower : recruits)
{
if (follower.isOnline())
{
memberOnlineNames.add(follower.getNameAndTitle(fme));
}
else
{
memberOfflineNames.add(follower.getNameAndTitle(fme));
}
}
sendMessage(p.txt.parse("<a>Members online: ") + TextUtil.implode(memberOnlineNames, sepparator));
sendMessage(p.txt.parse("<a>Members offline: ") + TextUtil.implode(memberOfflineNames, sepparator));
}