WARNING: YOU SHOULD NOT USE THIS COMMAND FOR A NORMAL SHUT-DOWN.
It comes with no warranty everything will be normal afterwards; Read Dzienny's comment. Use it only for an emergency.
- Code: Select all
using System;
// By: joppiesaus
namespace MCDzienny
{
public class CmdBrutalshutdown : Command
{
public override string name { get { return "brutalshutdown"; } }
public override string shortcut { get { return "bsd"; } }
public override string type { get { return "other"; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
public override void Use(Player p, string message)
{
Environment.Exit(0); // Insert exit code here, google it. 10 = unknown error, 2 = bad username, it is old win32 stuff.
// You don't have to edit it. Exit code zero will "normal shutdown". xD
}
public override void Help(Player p)
{
Player.SendMessage(p, "/brutalshutdown - Shutsdown the server immediatly. Not recommended for normal use.");
}
}
}
Uses:
- Someone is opped and is immediatly exploiting it
- Map is being heavealy griefed
- Anything that's need to be saved but you don't want to save.(someone has got really much money after he joined the server and earned it than, brutalshutdown and it's gone.)