You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
Java
42 lines
1.0 KiB
Java
package net.minecraft.command;
|
|
|
|
import net.minecraft.server.MinecraftServer;
|
|
import net.minecraft.world.storage.WorldInfo;
|
|
|
|
public class CommandToggleDownfall extends CommandBase
|
|
{
|
|
private static final String __OBFID = "CL_00001184";
|
|
|
|
public String getCommandName()
|
|
{
|
|
return "toggledownfall";
|
|
}
|
|
|
|
/**
|
|
* Return the required permission level for this command.
|
|
*/
|
|
public int getRequiredPermissionLevel()
|
|
{
|
|
return 2;
|
|
}
|
|
|
|
public String getCommandUsage(ICommandSender sender)
|
|
{
|
|
return "commands.downfall.usage";
|
|
}
|
|
|
|
public void processCommand(ICommandSender sender, String[] args)
|
|
{
|
|
this.toggleDownfall();
|
|
func_152373_a(sender, this, "commands.downfall.success", new Object[0]);
|
|
}
|
|
|
|
/**
|
|
* Toggle rain and enable thundering.
|
|
*/
|
|
protected void toggleDownfall()
|
|
{
|
|
WorldInfo worldinfo = MinecraftServer.getServer().worldServers[0].getWorldInfo();
|
|
worldinfo.setRaining(!worldinfo.isRaining());
|
|
}
|
|
} |