mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Fix /compload for VB commands.
This commit is contained in:
parent
d4373a052d
commit
3179b7ec34
@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2011 MCForge modified by headdetect
|
||||
Copyright 2011 MCForge modified by headdetect
|
||||
|
||||
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.
|
||||
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.
|
||||
*/
|
||||
namespace MCGalaxy.Commands
|
||||
{
|
||||
@ -24,27 +24,27 @@ namespace MCGalaxy.Commands
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
|
||||
public override bool museumUsable { get { return true; } }
|
||||
public override void Help(Player p) { Player.Message(p, "/compload <command> - Compiles AND loads <command> for use (shortcut = /cml)"); }
|
||||
public override void Use(Player p, string message)
|
||||
{
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
string[] param = message.Split(' ');
|
||||
if (message == "") { Help(p); return; }
|
||||
|
||||
if (param.Length == 1)
|
||||
{
|
||||
if (param.Length == 1) {
|
||||
Command.all.Find("compile").Use(p, message);
|
||||
Command.all.Find("cmdload").Use(p, message);
|
||||
Command.all.Find("help").Use(p, message);
|
||||
return;
|
||||
}
|
||||
else if (param[1] == "vb")
|
||||
{
|
||||
Command.all.Find("compile").Use(p, message + "vb");
|
||||
Command.all.Find("cmdload").Use(p, message + "vb");
|
||||
} else if (param[1] == "vb") {
|
||||
Command.all.Find("compile").Use(p, message + " vb");
|
||||
Command.all.Find("cmdload").Use(p, message + " vb");
|
||||
Command.all.Find("help").Use(p, message);
|
||||
return;
|
||||
} else {
|
||||
Help(p);
|
||||
}
|
||||
else { Help(p); return; }
|
||||
}
|
||||
|
||||
public override void Help(Player p) {
|
||||
Player.Message(p, "/compload <command> - Compiles and loads a C# command into the server for use.");
|
||||
Player.Message(p, "/compload <command> vb - Compiles and loads a Visual basic command into the server for use.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user