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 {
|
|
|
|
|
|
|
|
public CmdMapHeight() {
|
|
|
|
super();
|
|
|
|
|
|
|
|
this.aliases.add("mapheight");
|
|
|
|
this.aliases.add("mh");
|
|
|
|
|
2018-02-11 01:27:49 +01:00
|
|
|
this.optionalArgs.put("height", "height");
|
2018-02-11 01:20:13 +01:00
|
|
|
|
|
|
|
this.permission = Permission.MAPHEIGHT.node;
|
|
|
|
|
2018-12-21 22:46:10 +01:00
|
|
|
|
|
|
|
this.senderMustBePlayer = true;
|
2018-02-11 01:20:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void perform() {
|
2018-02-11 01:27:49 +01:00
|
|
|
if (args.size() == 0) {
|
|
|
|
fme.sendMessage(TL.COMMAND_MAPHEIGHT_CURRENT.format(fme.getMapHeight()));
|
2018-02-11 01:20:13 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-02-11 01:27:49 +01:00
|
|
|
int height = argAsInt(0);
|
|
|
|
|
2018-02-11 01:20:13 +01:00
|
|
|
fme.setMapHeight(height);
|
2018-02-11 02:03:31 +01:00
|
|
|
fme.sendMessage(TL.COMMAND_MAPHEIGHT_SET.format(fme.getMapHeight()));
|
2018-02-11 01:20:13 +01:00
|
|
|
}
|
|
|
|
|
2018-02-11 01:27:49 +01:00
|
|
|
@Override
|
2018-02-11 01:20:13 +01:00
|
|
|
public TL getUsageTranslation() {
|
|
|
|
return TL.COMMAND_MAPHEIGHT_DESCRIPTION;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|