Showing Dropping Anvil Something (Ignore)

This commit is contained in:
Driftay
2019-09-15 05:02:53 -04:00
parent c4e81286b7
commit d98f5d9723
285 changed files with 28732 additions and 28729 deletions

View File

@@ -6,41 +6,41 @@ import com.massivecraft.factions.zcore.util.TL;
public class CmdSetDefaultRole extends FCommand {
public CmdSetDefaultRole() {
super();
public CmdSetDefaultRole() {
super();
this.aliases.add("defaultrole");
this.aliases.add("defaultrank");
this.aliases.add("default");
this.aliases.add("def");
this.requiredArgs.add("role");
this.aliases.add("defaultrole");
this.aliases.add("defaultrank");
this.aliases.add("default");
this.aliases.add("def");
this.requiredArgs.add("role");
this.requirements = new CommandRequirements.Builder(Permission.DEFAULTRANK)
.playerOnly()
.memberOnly()
.build();
}
this.requirements = new CommandRequirements.Builder(Permission.DEFAULTRANK)
.playerOnly()
.memberOnly()
.build();
}
@Override
public void perform(CommandContext context) {
Role target = Role.fromString(context.argAsString(0).toUpperCase());
if (target == null) {
context.msg(TL.COMMAND_SETDEFAULTROLE_INVALIDROLE, context.argAsString(0));
return;
}
@Override
public void perform(CommandContext context) {
Role target = Role.fromString(context.argAsString(0).toUpperCase());
if (target == null) {
context.msg(TL.COMMAND_SETDEFAULTROLE_INVALIDROLE, context.argAsString(0));
return;
}
if (target == Role.LEADER) {
context.msg(TL.COMMAND_SETDEFAULTROLE_NOTTHATROLE, context.argAsString(0));
return;
}
if (target == Role.LEADER) {
context.msg(TL.COMMAND_SETDEFAULTROLE_NOTTHATROLE, context.argAsString(0));
return;
}
context.faction.setDefaultRole(target);
context.msg(TL.COMMAND_SETDEFAULTROLE_SUCCESS, target.nicename);
}
context.faction.setDefaultRole(target);
context.msg(TL.COMMAND_SETDEFAULTROLE_SUCCESS, target.nicename);
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_SETDEFAULTROLE_DESCRIPTION;
}
@Override
public TL getUsageTranslation() {
return TL.COMMAND_SETDEFAULTROLE_DESCRIPTION;
}
}