    001    package net.minecraft.src;
    002
    003    import net.minecraft.server.MinecraftServer;
    004
    005    public class CommandToggleDownfall extends CommandBase
    006    {
    007        public String getCommandName()
    008        {
    009            return "toggledownfall";
    010        }
    011
    012        public int func_82362_a()
    013        {
    014            return 2;
    015        }
    016
    017        public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr)
    018        {
    019            this.toggleDownfall();
    020            notifyAdmins(par1ICommandSender, "commands.downfall.success", new Object[0]);
    021        }
    022
    023        /**
    024         * Toggle rain and enable thundering.
    025         */
    026        protected void toggleDownfall()
    027        {
    028            MinecraftServer.getServer().worldServers[0].toggleRain();
    029            MinecraftServer.getServer().worldServers[0].getWorldInfo().setThundering(true);
    030        }
    031    }