Bigger /f map
Add /f mapheight <height> command to allow players to set their mapheight. Increase default map height and width to be in line with larger values servers want
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
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");
|
||||
|
||||
this.requiredArgs.add("height");
|
||||
|
||||
this.permission = Permission.MAPHEIGHT.node;
|
||||
|
||||
this.senderMustBePlayer = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
int height = argAsInt(0, -1);
|
||||
|
||||
if (height == -1) {
|
||||
fme.sendMessage(TL.COMMAND_MAPHEIGHT_DESCRIPTION.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
fme.setMapHeight(height);
|
||||
fme.sendMessage(TL.COMMAND_MAPHEIGHT_SET.format(height));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_MAPHEIGHT_DESCRIPTION;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -74,6 +74,7 @@ public class FCmdRoot extends FCommand {
|
||||
public CmdPromote cmdPromote = new CmdPromote();
|
||||
public CmdDemote cmdDemote = new CmdDemote();
|
||||
public CmdSetDefaultRole cmdSetDefaultRole = new CmdSetDefaultRole();
|
||||
public CmdMapHeight cmdMapHeight = new CmdMapHeight();
|
||||
|
||||
public FCmdRoot() {
|
||||
super();
|
||||
@@ -162,6 +163,7 @@ public class FCmdRoot extends FCommand {
|
||||
this.addSubCommand(this.cmdPromote);
|
||||
this.addSubCommand(this.cmdDemote);
|
||||
this.addSubCommand(this.cmdSetDefaultRole);
|
||||
this.addSubCommand(this.cmdMapHeight);
|
||||
if (P.p.isHookedPlayervaults()) {
|
||||
P.p.log("Found playervaults hook, adding /f vault and /f setmaxvault commands.");
|
||||
this.addSubCommand(new CmdSetMaxVaults());
|
||||
|
||||
Reference in New Issue
Block a user