Partial Overhaul of Commands

Made progress on overhauling and prettifying our commands. There are
still more changes to be done for this to be functional. I need to do an
intermediate commit because I want to merge in recent changes by Steven.
This commit is contained in:
SenseiKiwi
2013-06-25 13:55:13 -04:00
parent 06a8abbf74
commit bc2745a596
14 changed files with 425 additions and 226 deletions

View File

@@ -10,7 +10,7 @@ public class CommandStartDungeonCreation extends DDCommandBase
private CommandStartDungeonCreation()
{
super("dd-create");
super("dd-create", "");
}
public static CommandStartDungeonCreation instance()
@@ -22,10 +22,18 @@ public class CommandStartDungeonCreation extends DDCommandBase
}
@Override
protected void processCommand(EntityPlayer sender, String[] command)
protected DDCommandResult processCommand(EntityPlayer sender, String[] command)
{
//TODO: Some commands have isRemote checks, some do not. Why? Can commands even run locally anyway?
//What does it mean when you run a command locally? ~SenseiKiwi
if (!sender.worldObj.isRemote)
{
if (command.length > 0)
{
return DDCommandResult.TOO_MANY_ARGUMENTS;
}
//Place a door leading to a pocket dimension where the player is standing.
//The pocket dimension will be serve as a room for the player to build a dungeon.
int x = (int) sender.posX;
@@ -34,7 +42,8 @@ public class CommandStartDungeonCreation extends DDCommandBase
LinkData link = DungeonHelper.instance().createCustomDungeonDoor(sender.worldObj, x, y, z);
//Notify the player
sender.sendChatToPlayer("Created a door to a pocket dimension (ID = " + link.destDimID + "). Please build your dungeon there.");
sender.sendChatToPlayer("Created a door to a pocket dimension (Dimension ID = " + link.destDimID + "). Please build your dungeon there.");
}
return DDCommandResult.SUCCESS;
}
}