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