2018-02-11 01:20:13 +01:00
|
|
|
package com.massivecraft.factions.cmd;
|
|
|
|
|
|
|
|
import com.massivecraft.factions.struct.Permission;
|
|
|
|
import com.massivecraft.factions.zcore.util.TL;
|
|
|
|
|
|
|
|
public class CmdMapHeight extends FCommand {
|
|
|
|
|
2019-12-02 19:55:38 +01:00
|
|
|
/**
|
|
|
|
* @author FactionsUUID Team
|
|
|
|
*/
|
|
|
|
|
2019-09-15 11:19:06 +02:00
|
|
|
public CmdMapHeight() {
|
|
|
|
super();
|
|
|
|
|
2020-01-02 02:59:31 +01:00
|
|
|
this.aliases.addAll(Aliases.map_height);
|
2019-09-15 11:19:06 +02:00
|
|
|
this.optionalArgs.put("height", "height");
|
|
|
|
|
|
|
|
this.requirements = new CommandRequirements.Builder(Permission.MAPHEIGHT)
|
|
|
|
.playerOnly()
|
|
|
|
.build();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform(CommandContext context) {
|
|
|
|
if (context.args.size() == 0) {
|
|
|
|
context.fPlayer.sendMessage(TL.COMMAND_MAPHEIGHT_CURRENT.format(context.fPlayer.getMapHeight()));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
int height = context.argAsInt(0);
|
|
|
|
|
|
|
|
context.fPlayer.setMapHeight(height);
|
|
|
|
context.msg(TL.COMMAND_MAPHEIGHT_SET.format(context.fPlayer.getMapHeight()));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_MAPHEIGHT_DESCRIPTION;
|
|
|
|
}
|
2018-02-11 01:20:13 +01:00
|
|
|
|
|
|
|
}
|