base commands are now configurable

This commit is contained in:
Olof Larsson 2012-11-08 00:09:51 +01:00
parent 08dd0e1c3c
commit 34a7323f4a
2 changed files with 11 additions and 3 deletions

View File

@ -1,8 +1,13 @@
package com.massivecraft.mcore4;
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import com.massivecraft.mcore4.usys.cmd.CmdUsys;
import com.massivecraft.mcore4.util.MUtil;
public class Conf extends SimpleConfig
{
// -------------------------------------------- //
@ -11,6 +16,7 @@ public class Conf extends SimpleConfig
public static String dburi = "gson://./mstore";
public static String serverid = UUID.randomUUID().toString();
public static Map<String, List<String>> cmdaliases = MUtil.map(CmdUsys.USYS, MUtil.list(CmdUsys.USYS));
// -------------------------------------------- //
// META

View File

@ -1,11 +1,14 @@
package com.massivecraft.mcore4.usys.cmd;
import com.massivecraft.mcore4.Conf;
import com.massivecraft.mcore4.Permission;
import com.massivecraft.mcore4.cmd.HelpCommand;
import com.massivecraft.mcore4.cmd.req.ReqHasPerm;
public class CmdUsys extends UsysCommand
{
{
public final static String USYS = "usys";
public CmdUsysMultiverse cmdUsysMultiverse = new CmdUsysMultiverse();
public CmdUsysUniverse cmdUsysUniverse = new CmdUsysUniverse();
public CmdUsysWorld cmdUsysWorld = new CmdUsysWorld();
@ -15,8 +18,7 @@ public class CmdUsys extends UsysCommand
{
super();
// TODO: Make configurable
this.addAliases("usys");
this.addAliases(Conf.cmdaliases.get(USYS));
this.addSubCommand(this.cmdUsysMultiverse);
this.addSubCommand(this.cmdUsysUniverse);