mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-17 11:18:55 -04:00
Small fixes and improvements
Re-added XTitle, fixed fakerank, added more environment presets and other small fixes.
This commit is contained in:
parent
4d5fac0169
commit
c3eadb0ade
@ -52,7 +52,6 @@ namespace MCGalaxy.Commands
|
||||
p.SendMessage("Valid targets: player, level [Abbreviated as p and l]");
|
||||
p.SendMessage("Valid variables: fog, cloud, sky, sun, shadow, level, horizon, border, weather, preset(l only)");
|
||||
p.SendMessage("Using 'normal' as a value will reset the variable");
|
||||
|
||||
}
|
||||
public void Parse(Player p, string target, string[] pars)
|
||||
{
|
||||
@ -609,12 +608,6 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
break;
|
||||
case "preset":
|
||||
if (valueText.Equals(""))
|
||||
{
|
||||
p.SendMessage("/env l preset [type] -- Uses an env preset on your map");
|
||||
p.SendMessage("Valid types: Cartoon/Midnight/Noir/Normal/Trippy/Watery");
|
||||
return;
|
||||
}
|
||||
if (valueText.Equals("midnight", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l fog 8b8989");
|
||||
@ -673,7 +666,45 @@ namespace MCGalaxy.Commands
|
||||
Command.all.Find("env").Use(p, "l level normal");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
if (valueText.Equals("gloomy", StringComparison.OrdinalIgnoreCase))//if (args[0] == "gloomy")
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l cloud 405875");
|
||||
Command.all.Find("env").Use(p, "l sky 405875");
|
||||
Command.all.Find("env").Use(p, "l sun 444466");
|
||||
Command.all.Find("env").Use(p, "l shadow 3B3B59");
|
||||
Command.all.Find("env").Use(p, "l fog 6A80A5");
|
||||
return;
|
||||
}
|
||||
if (valueText.Equals("cloudy", StringComparison.OrdinalIgnoreCase))//if (args[0] == "cloudy")
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l cloud 8E8E8E");
|
||||
Command.all.Find("env").Use(p, "l sky 8E8E8E");
|
||||
Command.all.Find("env").Use(p, "l sun 9b9b9b");
|
||||
Command.all.Find("env").Use(p, "l shadow 8C8C8C");
|
||||
Command.all.Find("env").Use(p, "l fog AFAFAF");
|
||||
return;
|
||||
}
|
||||
if (valueText.Equals("sunset", StringComparison.OrdinalIgnoreCase))//if (args[0] == "sunset")
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l cloud 9A6551");
|
||||
Command.all.Find("env").Use(p, "l sky 836668");
|
||||
Command.all.Find("env").Use(p, "l sun 7F6C60");
|
||||
Command.all.Find("env").Use(p, "l shadow 46444C");
|
||||
Command.all.Find("env").Use(p, "l fog FFA322");
|
||||
return;
|
||||
}
|
||||
if (valueText.Equals("midnight2", StringComparison.OrdinalIgnoreCase))//if (args[0] == "midnight")
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l cloud 1E223A");
|
||||
Command.all.Find("env").Use(p, "l sky 070A23");
|
||||
Command.all.Find("env").Use(p, "l sun 181828");
|
||||
Command.all.Find("env").Use(p, "l shadow 0F0F19");
|
||||
Command.all.Find("env").Use(p, "l fog 131947");
|
||||
return;
|
||||
}
|
||||
p.SendMessage("/env l preset [type] -- Uses an env preset on your map");
|
||||
p.SendMessage("Valid types: Cartoon/Midnight/Midnight2/Noir/Normal/Trippy/Watery/Sunset/Gloomy/Cloudy");
|
||||
return;
|
||||
default:
|
||||
Help(p);
|
||||
break;
|
||||
|
@ -51,12 +51,13 @@ namespace MCGalaxy.Commands
|
||||
|
||||
if (grp.name == "banned")
|
||||
{
|
||||
Player.GlobalMessage(plr.color + plr.DisplayName + Server.DefaultColor + " is now &8banned" + Server.DefaultColor + "!");
|
||||
Player.GlobalMessage(plr.color + plr.name + Server.DefaultColor + " was &8banned" + Server.DefaultColor + " by " + p.color + p.DisplayName + Server.DefaultColor + "!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Player.GlobalMessage(plr.color + plr.DisplayName + Server.DefaultColor + "'s rank was set to " + grp.color + grp.name + Server.DefaultColor + ".");
|
||||
Player.GlobalMessage("&6Congratulations!");
|
||||
plr.SendMessage("&6Congratulations!");
|
||||
plr.SendMessage("You are now ranked " + grp.color + grp.name + Server.DefaultColor + ", type /help for your new set of commands.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,8 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
public override void Help(Player p)
|
||||
{
|
||||
Player.SendMessage(p, "/fly - Allows you to fly, it is a bit glitchy, you can't fly while playing CTF.");
|
||||
Player.SendMessage(p, "/fly - The old method of flight before custom clients.");
|
||||
Player.SendMessage(p, "May not work at all depending on your connection.");
|
||||
}
|
||||
|
||||
struct Pos { public ushort x, y, z; }
|
||||
|
@ -15,6 +15,7 @@
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System;
|
||||
namespace MCGalaxy.Commands
|
||||
{
|
||||
public sealed class CmdMe : Command
|
||||
@ -25,7 +26,6 @@ namespace MCGalaxy.Commands
|
||||
public override bool museumUsable { get { return true; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
|
||||
public CmdMe() { }
|
||||
|
||||
public override void Use(Player p, string message)
|
||||
{
|
||||
if (message == "") { Player.SendMessage(p, "You"); return; }
|
||||
@ -36,11 +36,11 @@ namespace MCGalaxy.Commands
|
||||
|
||||
if (Server.worldChat)
|
||||
{
|
||||
Player.GlobalChat(p, p.color + "*" + p.DisplayName + " " + message, false);
|
||||
Player.GlobalChat(p, p.color + "*" + Player.StripColours(p.DisplayName) + p.color + " " + message, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Player.GlobalChatLevel(p, p.color + "*" + p.DisplayName + " " + message, false);
|
||||
Player.GlobalChatLevel(p, p.color + "*" + Player.StripColours(p.DisplayName) + p.color + " " + message, false);
|
||||
}
|
||||
//IRCBot.Say("*" + p.name + " " + message);
|
||||
Server.IRC.Say("*" + p.DisplayName + " " + message);
|
||||
|
@ -101,88 +101,13 @@ namespace MCGalaxy.Commands
|
||||
}
|
||||
else if (cmd == "PRESET")
|
||||
{
|
||||
if (par == "MIDNIGHT")
|
||||
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
|
||||
{
|
||||
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l preset midnight");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.SendMessage("This is not your map..");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (par == "CARTOON")
|
||||
{
|
||||
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l preset cartoon");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.SendMessage("This is not your map..");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (par == "NOIR")
|
||||
{
|
||||
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l preset noir");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.SendMessage("This is not your map..");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (par == "TRIPPY")
|
||||
{
|
||||
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l preset trippy");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.SendMessage("This is not your map..");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (par == "WATERY")
|
||||
{
|
||||
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l preset watery");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.SendMessage("This is not your map..");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (par == "NORMAL")
|
||||
{
|
||||
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
|
||||
{
|
||||
Command.all.Find("env").Use(p, "l preset normal");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.SendMessage("This is not your map..");
|
||||
return;
|
||||
}
|
||||
Command.all.Find("env").Use(p, "l preset " + par);
|
||||
}
|
||||
else
|
||||
{
|
||||
Player.SendMessage(p, "/overseer preset [type] -- Uses an env preset on your map");
|
||||
Player.SendMessage(p, "Valid types: Cartoon/Midnight/Noir/Normal/Trippy/Watery");
|
||||
p.SendMessage("This is not your map.");
|
||||
}
|
||||
}
|
||||
else if (cmd == "WEATHER")
|
||||
|
@ -71,11 +71,11 @@ namespace MCGalaxy.Commands
|
||||
if (String.IsNullOrEmpty(message) || !Group.Exists(message) || Group.Find(message) == pl.group)
|
||||
{
|
||||
totalPlayers++;
|
||||
string foundName = pl.name;
|
||||
string foundName = Player.StripColours(pl.DisplayName);
|
||||
|
||||
if (Server.afkset.Contains(pl.name))
|
||||
{
|
||||
foundName = pl.name + "-afk";
|
||||
foundName = Player.StripColours(pl.DisplayName + "-afk");
|
||||
}
|
||||
|
||||
if (pl.muted) foundName += "[muted]";
|
||||
|
@ -64,9 +64,10 @@ namespace MCGalaxy.Commands
|
||||
who.hasreadrules = true;
|
||||
if (who.level == Server.mainLevel && Server.mainLevel.permissionbuild == LevelPermission.Guest) { who.SendMessage("You are currently on the guest map where anyone can build"); }
|
||||
who.SendMessage("Server Rules:");
|
||||
if (who.name != p.name) {Player.SendMessage(p, "Sent the rules to " + who.color + who.DisplayName + Server.DefaultColor + ".");}
|
||||
foreach (string s in rules)
|
||||
who.SendMessage(s);
|
||||
|
||||
if (who.name != p.name) {who.SendMessage(p.color + p.DisplayName + Server.DefaultColor + " sent you the rules.");}
|
||||
}
|
||||
else if (p == null && String.IsNullOrEmpty(message))
|
||||
{
|
||||
@ -82,7 +83,15 @@ namespace MCGalaxy.Commands
|
||||
|
||||
public override void Help(Player p)
|
||||
{
|
||||
Player.SendMessage(p, "/rules [player]- Displays server rules to a player");
|
||||
if ((int)p.group.Permission >= CommandOtherPerms.GetPerm(this))
|
||||
{
|
||||
Player.SendMessage(p, "/rules [player]- Displays server rules to a player.");
|
||||
Player.SendMessage(p, "If no [player] is given, the rules will be sent to you.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Player.SendMessage(p, "/rules - Displays the server rules.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ namespace MCGalaxy.Commands
|
||||
newRank.playerList.Add(who.name);
|
||||
newRank.playerList.Save();
|
||||
|
||||
Player.GlobalChat(who, who.color + who.DisplayName + Server.DefaultColor + "'s rank was set to " + newRank.color + newRank.name, false);
|
||||
Player.GlobalChat(who, who.color + who.DisplayName + Server.DefaultColor + "'s rank was set to " + newRank.color + newRank.name + Server.DefaultColor + ".", false);
|
||||
Player.SendMessage(who, "&6" + msgGave, false);
|
||||
Server.IRC.Say(who.color + who.DisplayName + Server.DefaultColor + "'s rank was set to " + newRank.color + newRank.name + ". Reason: " + msgGave);
|
||||
|
||||
|
@ -323,7 +323,7 @@ namespace MCGalaxy
|
||||
all.Add(new CmdXNick());
|
||||
all.Add(new CmdXspawn());
|
||||
all.Add(new CmdXTColor());
|
||||
//all.Add(new CmdXTitle());
|
||||
all.Add(new CmdXTitle());
|
||||
all.Add(new CmdXundo());
|
||||
all.Add(new CmdZombieGame());
|
||||
all.Add(new CmdZone());
|
||||
|
@ -866,7 +866,38 @@ namespace MCGalaxy
|
||||
tempref.b = 225;
|
||||
tempref.type = 36;
|
||||
refCol.Add(tempref);
|
||||
|
||||
tempref.r = 163;
|
||||
tempref.g = 163;
|
||||
tempref.b = 163;
|
||||
tempref.type = 43; //doubleStair
|
||||
refCol.Add(tempref);
|
||||
/*
|
||||
tempref.r = 217; Turns out the back layer blocks are handled awfully.
|
||||
tempref.g = 131;
|
||||
tempref.b = 155;
|
||||
tempref.type = 55; //lightPink
|
||||
refCol.Add(tempref);
|
||||
tempref.r = 56;
|
||||
tempref.g = 77;
|
||||
tempref.b = 24;
|
||||
tempref.type = 56; //forestGreen
|
||||
refCol.Add(tempref);
|
||||
tempref.r = 86;
|
||||
tempref.g = 51;
|
||||
tempref.b = 28;
|
||||
tempref.type = 57; //brownWool
|
||||
refCol.Add(tempref);
|
||||
tempref.r = 39;
|
||||
tempref.g = 51;
|
||||
tempref.b = 154;
|
||||
tempref.type = 58; //deepBlue
|
||||
refCol.Add(tempref);
|
||||
tempref.r = 39;
|
||||
tempref.g = 117;
|
||||
tempref.b = 149;
|
||||
tempref.type = 59; //turk oys
|
||||
refCol.Add(tempref);
|
||||
*/
|
||||
// BACK LAYER BLOCKS
|
||||
|
||||
tempref.r = 57;
|
||||
@ -974,6 +1005,7 @@ namespace MCGalaxy
|
||||
tempref.b = 0;
|
||||
tempref.type = 49;
|
||||
refCol.Add(tempref);
|
||||
|
||||
}
|
||||
else if (popType == 2) // poptype 2 = 1 layer color image
|
||||
{
|
||||
|
@ -223,9 +223,6 @@
|
||||
<Compile Include="Plugins\Utils\Priority.cs" />
|
||||
<Compile Include="Translate.cs" />
|
||||
<Compile Include="Commands\CmdLocation.cs" />
|
||||
<Compile Include="Commands\CmdMark.cs" />
|
||||
<Compile Include="Commands\CmdRanks.cs" />
|
||||
<Compile Include="Commands\CmdXModel.cs" />
|
||||
<Compile Include="Commands\CmdAscend.cs" />
|
||||
<Compile Include="Commands\CmdBanEdit.cs" />
|
||||
<Compile Include="Commands\CmdDescend.cs" />
|
||||
|
@ -1102,7 +1102,7 @@ namespace MCGalaxy {
|
||||
{
|
||||
extension = true;
|
||||
|
||||
SendExtInfo(11);
|
||||
SendExtInfo(12);
|
||||
SendExtEntry("ClickDistance", 1);
|
||||
SendExtEntry("CustomBlocks", 1);
|
||||
SendExtEntry("HeldBlock", 1);
|
||||
@ -2347,7 +2347,7 @@ try { SendBlockchange(pos1.x, pos1.y, pos1.z, Block.waterstill); } catch { }
|
||||
text = text.Remove(0, 2);
|
||||
if ( text.Length < 1 ) { SendMessage("No message entered"); return; }
|
||||
SendChat(this, Server.DefaultColor + "[<] Console: &f" + text);
|
||||
Server.s.Log("[>] " + this.DisplayName + ": " + text);
|
||||
Server.s.Log("[>] " + this.name + ": " + text);
|
||||
return;
|
||||
}
|
||||
if ( text[0] == '@' || whisper ) {
|
||||
@ -3042,12 +3042,6 @@ return;
|
||||
retryTag: try {
|
||||
foreach ( string line in Wordwrap(message) ) {
|
||||
string newLine = line;
|
||||
if ( newLine.TrimEnd(' ')[newLine.TrimEnd(' ').Length - 1] < '!' ) {
|
||||
if (HasExtension("EmoteFix"))
|
||||
{
|
||||
newLine += '\'';
|
||||
}
|
||||
}
|
||||
StringFormat(newLine, 64).CopyTo(buffer, 1);
|
||||
SendRaw(13, buffer);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user