Added weather parameter to framework.

This commit is contained in:
Steven Lawson 2013-08-16 21:36:25 -04:00
parent 25fbb0c05a
commit 9fe05add7f

View File

@ -12,7 +12,7 @@ public class Command_adminworld extends TFM_Command
{ {
private enum CommandMode private enum CommandMode
{ {
TELEPORT, GUEST, TIME TELEPORT, GUEST, TIME, WEATHER
} }
@Override @Override
@ -20,18 +20,6 @@ public class Command_adminworld extends TFM_Command
{ {
CommandMode commandMode = null; CommandMode commandMode = null;
/*
*
* /adminworld
*
* /adminworld guest list
* /adminworld guest remove <player>
* /adminworld guest add <player>
*
* /adminworld time <time>
*
*/
if (args.length == 0) if (args.length == 0)
{ {
commandMode = CommandMode.TELEPORT; commandMode = CommandMode.TELEPORT;
@ -46,6 +34,10 @@ public class Command_adminworld extends TFM_Command
{ {
commandMode = CommandMode.TIME; commandMode = CommandMode.TIME;
} }
else if ("weather".equalsIgnoreCase(args[0]))
{
commandMode = CommandMode.WEATHER;
}
} }
if (commandMode == null) if (commandMode == null)
@ -57,6 +49,7 @@ public class Command_adminworld extends TFM_Command
{ {
case TELEPORT: case TELEPORT:
{ {
// /adminworld
if (sender_p.getWorld() == TFM_AdminWorld.getInstance().getAdminWorld()) if (sender_p.getWorld() == TFM_AdminWorld.getInstance().getAdminWorld())
{ {
playerMsg("Going to the main world."); playerMsg("Going to the main world.");
@ -72,6 +65,9 @@ public class Command_adminworld extends TFM_Command
} }
case GUEST: case GUEST:
{ {
// /adminworld guest list
// /adminworld guest add <player>
// /adminworld guest remove <player>
if (args.length == 2) if (args.length == 2)
{ {
if ("list".equalsIgnoreCase(args[1])) if ("list".equalsIgnoreCase(args[1]))
@ -95,6 +91,7 @@ public class Command_adminworld extends TFM_Command
} }
case TIME: case TIME:
{ {
// /adminworld time <morning|noon|evening|night>
if (args.length == 2) if (args.length == 2)
{ {
//set time = args[1] //set time = args[1]
@ -102,6 +99,16 @@ public class Command_adminworld extends TFM_Command
break; break;
} }
case WEATHER:
{
// /adminworld weather <off|on|storm>
if (args.length == 2)
{
//set weather = args[1]
}
break;
}
default: default:
{ {
return false; return false;