Showing Dropping Anvil Something (Ignore)
This commit is contained in:
@@ -7,36 +7,36 @@ import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdSetMaxVaults extends FCommand {
|
||||
|
||||
public CmdSetMaxVaults() {
|
||||
this.aliases.add("setmaxvaults");
|
||||
this.aliases.add("smv");
|
||||
this.requiredArgs.add("faction");
|
||||
this.requiredArgs.add("number");
|
||||
public CmdSetMaxVaults() {
|
||||
this.aliases.add("setmaxvaults");
|
||||
this.aliases.add("smv");
|
||||
this.requiredArgs.add("faction");
|
||||
this.requiredArgs.add("number");
|
||||
|
||||
this.requirements = new CommandRequirements.Builder(Permission.SETMAXVAULTS)
|
||||
.build();
|
||||
}
|
||||
this.requirements = new CommandRequirements.Builder(Permission.SETMAXVAULTS)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
Faction targetFaction = context.argAsFaction(0);
|
||||
int value = context.argAsInt(1, -1);
|
||||
if (value < 0) {
|
||||
context.sender.sendMessage(ChatColor.RED + "Number must be greater than 0.");
|
||||
return;
|
||||
}
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
Faction targetFaction = context.argAsFaction(0);
|
||||
int value = context.argAsInt(1, -1);
|
||||
if (value < 0) {
|
||||
context.sender.sendMessage(ChatColor.RED + "Number must be greater than 0.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (targetFaction == null) {
|
||||
context.sender.sendMessage(ChatColor.RED + "Couldn't find Faction: " + ChatColor.YELLOW + context.argAsString(0));
|
||||
return;
|
||||
}
|
||||
if (targetFaction == null) {
|
||||
context.sender.sendMessage(ChatColor.RED + "Couldn't find Faction: " + ChatColor.YELLOW + context.argAsString(0));
|
||||
return;
|
||||
}
|
||||
|
||||
targetFaction.setMaxVaults(value);
|
||||
context.sender.sendMessage(TL.COMMAND_SETMAXVAULTS_SUCCESS.format(targetFaction.getTag(), value));
|
||||
}
|
||||
targetFaction.setMaxVaults(value);
|
||||
context.sender.sendMessage(TL.COMMAND_SETMAXVAULTS_SUCCESS.format(targetFaction.getTag(), value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_SETMAXVAULTS_DESCRIPTION;
|
||||
}
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_SETMAXVAULTS_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user