Reformat before I go crazy.
This commit is contained in:
@@ -6,47 +6,43 @@ import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TextUtil;
|
||||
|
||||
public class CmdTitle extends FCommand
|
||||
{
|
||||
public CmdTitle()
|
||||
{
|
||||
this.aliases.add("title");
|
||||
|
||||
this.requiredArgs.add("player name");
|
||||
this.optionalArgs.put("title", "");
|
||||
|
||||
this.permission = Permission.TITLE.node;
|
||||
this.disableOnLock = true;
|
||||
|
||||
senderMustBePlayer = true;
|
||||
senderMustBeMember = false;
|
||||
senderMustBeModerator = true;
|
||||
senderMustBeAdmin = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform()
|
||||
{
|
||||
FPlayer you = this.argAsBestFPlayerMatch(0);
|
||||
if (you == null) return;
|
||||
|
||||
args.remove(0);
|
||||
String title = TextUtil.implode(args, " ");
|
||||
|
||||
if ( ! canIAdministerYou(fme, you)) return;
|
||||
public class CmdTitle extends FCommand {
|
||||
public CmdTitle() {
|
||||
this.aliases.add("title");
|
||||
|
||||
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
|
||||
if ( ! payForCommand(Conf.econCostTitle, "to change a players title", "for changing a players title")) return;
|
||||
this.requiredArgs.add("player name");
|
||||
this.optionalArgs.put("title", "");
|
||||
|
||||
you.setTitle(title);
|
||||
|
||||
// Inform
|
||||
myFaction.msg("%s<i> changed a title: %s", fme.describeTo(myFaction, true), you.describeTo(myFaction, true));
|
||||
this.permission = Permission.TITLE.node;
|
||||
this.disableOnLock = true;
|
||||
|
||||
senderMustBePlayer = true;
|
||||
senderMustBeMember = false;
|
||||
senderMustBeModerator = true;
|
||||
senderMustBeAdmin = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
FPlayer you = this.argAsBestFPlayerMatch(0);
|
||||
if (you == null) return;
|
||||
|
||||
args.remove(0);
|
||||
String title = TextUtil.implode(args, " ");
|
||||
|
||||
if (!canIAdministerYou(fme, you)) return;
|
||||
|
||||
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
|
||||
if (!payForCommand(Conf.econCostTitle, "to change a players title", "for changing a players title")) return;
|
||||
|
||||
you.setTitle(title);
|
||||
|
||||
// Inform
|
||||
myFaction.msg("%s<i> changed a title: %s", fme.describeTo(myFaction, true), you.describeTo(myFaction, true));
|
||||
|
||||
if (Conf.spoutFactionTitlesOverNames) {
|
||||
SpoutFeatures.updateAppearances(me);
|
||||
}
|
||||
}
|
||||
|
||||
if (Conf.spoutFactionTitlesOverNames)
|
||||
{
|
||||
SpoutFeatures.updateAppearances(me);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user