Merge remote-tracking branch 'origin/1.6.x' into 1.6.x

This commit is contained in:
Driftay
2019-11-29 04:59:20 -05:00
8 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.FactionsPlugin;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
public class CmdPlayerTitleToggle extends FCommand {
public CmdPlayerTitleToggle() {
super();
this.aliases.add("titles");
this.requirements = new CommandRequirements.Builder(Permission.TOGGLE_TITLES)
.build();
}
@Override
public void perform(CommandContext context) {
context.fPlayer.setTitlesEnabled(!context.fPlayer.hasTitlesEnabled());
context.msg(TL.COMMAND_TITLETOGGLE_TOGGLED, context.fPlayer.hasTitlesEnabled() ? FactionsPlugin.getInstance().color("&dEnabled") : FactionsPlugin.getInstance().color("&dDisabled"));
}
@Override
public TL getUsageTranslation() {return TL.COMMAND_TITLETOGGLE_DESCRIPTION;}
}

View File

@@ -87,6 +87,7 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
public CmdStuck cmdStuck = new CmdStuck();
public CmdTag cmdTag = new CmdTag();
public CmdTitle cmdTitle = new CmdTitle();
public CmdPlayerTitleToggle cmdPlayerTitleToggle = new CmdPlayerTitleToggle();
public CmdToggleAllianceChat cmdToggleAllianceChat = new CmdToggleAllianceChat();
public CmdUnclaim cmdUnclaim = new CmdUnclaim();
public CmdUnclaimall cmdUnclaimall = new CmdUnclaimall();
@@ -215,6 +216,7 @@ public class FCmdRoot extends FCommand implements CommandExecutor {
this.addSubCommand(this.cmdLogout);
this.addSubCommand(this.cmdTag);
this.addSubCommand(this.cmdTitle);
this.addSubCommand(this.cmdPlayerTitleToggle);
this.addSubCommand(this.cmdUnclaim);
this.addSubCommand(this.cmdUnclaimall);
this.addSubCommand(this.cmdVersion);