mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-10-05 03:28:29 -04:00
42 lines
1.7 KiB
C#
42 lines
1.7 KiB
C#
/*
|
|
Copyright 2010 MCSharp team (Modified for use with MCZall/MCLawl/MCGalaxy)
|
|
|
|
Dual-licensed under the Educational Community License, Version 2.0 and
|
|
the GNU General Public License, Version 3 (the "Licenses"); you may
|
|
not use this file except in compliance with the Licenses. You may
|
|
obtain a copy of the Licenses at
|
|
|
|
http://www.opensource.org/licenses/ecl2.php
|
|
http://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the Licenses are distributed on an "AS IS"
|
|
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
or implied. See the Licenses for the specific language governing
|
|
permissions and limitations under the Licenses.
|
|
*/
|
|
using System;
|
|
|
|
namespace MCGalaxy.Commands.World {
|
|
public sealed class CmdLoad : Command2 {
|
|
public override string name { get { return "Load"; } }
|
|
public override string type { get { return CommandTypes.World; } }
|
|
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
|
public override CommandAlias[] Aliases {
|
|
get { return new[] { new CommandAlias("MapLoad"), new CommandAlias("WLoad") }; }
|
|
}
|
|
|
|
public override void Use(Player p, string message, CommandData data) {
|
|
if (message.Length == 0) { Help(p); return; }
|
|
string[] args = message.SplitSpaces();
|
|
if (args.Length > 2) { Help(p); return; }
|
|
LevelActions.Load(p, args[0], true);
|
|
}
|
|
|
|
public override void Help(Player p) {
|
|
p.Message("%T/Load [level]");
|
|
p.Message("%HLoads a level.");
|
|
}
|
|
}
|
|
}
|