} else if (args[1].equalsIgnoreCase("night")) {
CommandsEventHandler.makeWorldTimeHours(world, WeatherTimeData.nightTimeStart);
} else {
world.setWorldTime(parseInt(sender, args[1]));
}
WeatherTimeData wt = CommandDataManager.WTmap.get(world.provider.dimensionId);
wt.freezeTime = world.getWorldTime();
return String.format("Set time to %s.", args[1]);
}
case "add":
{
if (args.length == 1) {
throw new CommandException("Improper syntax. Please try this instead: [dimID, none for all] <freeze|lock|set|add> <time (number)|day|night>");
}
world.setWorldTime(world.getWorldTime() + parseInt(sender, args[1]));
WeatherTimeData wt = CommandDataManager.WTmap.get(world.provider.dimensionId);
wt.freezeTime = world.getWorldTime();
return String.format("Added %d to the current time.", args[1]);
}
case "freeze":
{
WeatherTimeData wt = CommandDataManager.WTmap.get(world.provider.dimensionId);
wt.freezeTime = world.getWorldTime();
wt.timeFreeze = !wt.timeFreeze;
return "Time freeze" + (wt.timeFreeze ? "on" : "off");
}
case "lock":
{
WeatherTimeData wt = CommandDataManager.WTmap.get(world.provider.dimensionId);
if (args.length == 1) {
wt.timeSpecified = !wt.timeSpecified;
} else {
wt.timeSpecified = true;
if (args[1].equalsIgnoreCase("day")) {