- Code: Select all
/*
Auto-generated command skeleton class.
Use this as a basis for custom commands implemented via the MCDzienny scripting framework.
File and class should be named a specific way. For example, /update is named 'CmdUpdate.cs' for the file, and 'CmdUpdate' for the class.
*/
// Add any other using statements you need up here, of course.
// As a note, MCDzienny is designed for .NET 3.5.
using System;
namespace MCDzienny
{
public class CmdStopServer : Command
{
public override string name { get { return "stopserver"; } }
public override string shortcut { get { return "stop"; } }
public override string type { get { return "other"; } }
public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Nobody; } }
public override void Use(Player p, string message)
{
if (p == null) { Player.SendMessage(p, "You have failed to shutdown the server"); return; }
Player.GlobalMessage(p.name + " has execute shutdown!");
Command.all.Find("shutdown").Use(null, "10" + " Shutting down...Bye2 everyone :D");
}
public override void Help(Player p)
{
Player.SendMessage(p, "/StopServer - Gracefully shutsdown the server ");
}
}
}
I usually just pick a person on the server and do "/make kingt3 stop"