Fix default mapheight
This commit is contained in:
parent
50930d7583
commit
0f6bd8eabd
@ -11,7 +11,7 @@ public class CmdMapHeight extends FCommand {
|
|||||||
this.aliases.add("mapheight");
|
this.aliases.add("mapheight");
|
||||||
this.aliases.add("mh");
|
this.aliases.add("mh");
|
||||||
|
|
||||||
this.requiredArgs.add("height");
|
this.optionalArgs.put("height", "height");
|
||||||
|
|
||||||
this.permission = Permission.MAPHEIGHT.node;
|
this.permission = Permission.MAPHEIGHT.node;
|
||||||
|
|
||||||
@ -20,13 +20,13 @@ public class CmdMapHeight extends FCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void perform() {
|
public void perform() {
|
||||||
int height = argAsInt(0, -1);
|
if (args.size() == 0) {
|
||||||
|
fme.sendMessage(TL.COMMAND_MAPHEIGHT_CURRENT.format(fme.getMapHeight()));
|
||||||
if (height == -1) {
|
|
||||||
fme.sendMessage(TL.COMMAND_MAPHEIGHT_DESCRIPTION.toString());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int height = argAsInt(0);
|
||||||
|
|
||||||
fme.setMapHeight(height);
|
fme.setMapHeight(height);
|
||||||
fme.sendMessage(TL.COMMAND_MAPHEIGHT_SET.format(height));
|
fme.sendMessage(TL.COMMAND_MAPHEIGHT_SET.format(height));
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ public abstract class MemoryFPlayer implements FPlayer {
|
|||||||
protected boolean isAdminBypassing = false;
|
protected boolean isAdminBypassing = false;
|
||||||
protected int kills, deaths;
|
protected int kills, deaths;
|
||||||
protected boolean willAutoLeave = true;
|
protected boolean willAutoLeave = true;
|
||||||
protected int mapHeight;
|
protected int mapHeight = 8; // default to old value
|
||||||
|
|
||||||
protected transient FLocation lastStoodAt = new FLocation(); // Where did this player stand the last time we checked?
|
protected transient FLocation lastStoodAt = new FLocation(); // Where did this player stand the last time we checked?
|
||||||
protected transient boolean mapAutoUpdating;
|
protected transient boolean mapAutoUpdating;
|
||||||
|
@ -295,8 +295,9 @@ public enum TL {
|
|||||||
COMMAND_MAP_UPDATE_DISABLED("<i>Map auto update <red>DISABLED."),
|
COMMAND_MAP_UPDATE_DISABLED("<i>Map auto update <red>DISABLED."),
|
||||||
COMMAND_MAP_DESCRIPTION("Show the territory map, and set optional auto update"),
|
COMMAND_MAP_DESCRIPTION("Show the territory map, and set optional auto update"),
|
||||||
|
|
||||||
COMMAND_MAPHEIGHT_DESCRIPTION("Update the lines that /f map sends"),
|
COMMAND_MAPHEIGHT_DESCRIPTION("&eUpdate the lines that /f map sends"),
|
||||||
COMMAND_MAPHEIGHT_SET("Set /f map lines to %1$d"),
|
COMMAND_MAPHEIGHT_SET("&eSet /f map lines to &a%1$d"),
|
||||||
|
COMMAND_MAPHEIGHT_CURRENT("&eCurrent mapheight: &a%1$d"),
|
||||||
|
|
||||||
COMMAND_MOD_CANDIDATES("Players you can promote: "),
|
COMMAND_MOD_CANDIDATES("Players you can promote: "),
|
||||||
COMMAND_MOD_CLICKTOPROMOTE("Click to promote "),
|
COMMAND_MOD_CLICKTOPROMOTE("Click to promote "),
|
||||||
|
Loading…
Reference in New Issue
Block a user