diff --git a/GUI/ColoredTextBox.cs b/GUI/ColoredTextBox.cs
index 1dd30bc41..007681078 100644
--- a/GUI/ColoredTextBox.cs
+++ b/GUI/ColoredTextBox.cs
@@ -36,7 +36,7 @@ namespace MCGalaxy.Gui.Components {
get { return _autoScroll; }
set {
_autoScroll = value;
- if ( value ) ScrollToEnd(0);
+ if (value) ScrollToEnd(0);
}
}
@@ -79,11 +79,6 @@ namespace MCGalaxy.Gui.Components {
/// Appends text to this textbox.
public void AppendLog(string text, Color color, bool dateStamp) {
- if (InvokeRequired) {
- Invoke((MethodInvoker)(() => AppendLog(text, color, dateStamp)));
- return;
- }
-
int line = GetLineFromCharIndex(Math.Max(0, TextLength - 1));
int selLength = SelectionLength, selStart = 0;
if (selLength > 0) selStart = SelectionStart;
@@ -125,7 +120,6 @@ namespace MCGalaxy.Gui.Components {
}
/// Appends text with a specific color to this textbox.
- /// NOT THREAD SAFE
internal void AppendColoredText(string text, Color color) {
SelectionStart = TextLength;
SelectionLength = 0;
diff --git a/MCGalaxy/Blocks/BlockProperties.cs b/MCGalaxy/Blocks/BlockProperties.cs
index 5b87be0df..60a461084 100644
--- a/MCGalaxy/Blocks/BlockProperties.cs
+++ b/MCGalaxy/Blocks/BlockProperties.cs
@@ -106,7 +106,7 @@ namespace MCGalaxy.Blocks {
BlockProps props = list[b];
string deathMsg = props.DeathMessage == null ? "" : props.DeathMessage.Replace(":", "\\;");
- w.WriteLine(b + ":" + props.IsRails + ":" + props.IsTDoor + ":" + props.IsDoor + ":"
+ w.WriteLine(b + ":" + props.IsRails + ":" + props.IsTDoor + ":" + props.IsDoor + ":"
+ props.IsMessageBlock + ":" + props.IsPortal + ":" + props.WaterKills + ":"
+ props.LavaKills + ":" + props.KillerBlock + ":" + deathMsg + ":"
+ (byte)props.AnimalAI + ":" + props.StackBlock + ":" + props.OPBlock + ":"
diff --git a/MCGalaxy/Blocks/Physics/FinitePhysics.cs b/MCGalaxy/Blocks/Physics/FinitePhysics.cs
index 8c0d9ae5f..bef0badcc 100644
--- a/MCGalaxy/Blocks/Physics/FinitePhysics.cs
+++ b/MCGalaxy/Blocks/Physics/FinitePhysics.cs
@@ -102,7 +102,7 @@ namespace MCGalaxy.Blocks.Physics {
int i = indices[j];
switch (i) {
case 0:
- if (Expand(lvl, (ushort)(x - 1), y, z)) return;
+ if (Expand(lvl, (ushort)(x - 1), y, z)) return;
break;
case 1:
if (Expand(lvl, (ushort)(x + 1), y, z)) return;
diff --git a/MCGalaxy/Blocks/Physics/FireworkPhysics.cs b/MCGalaxy/Blocks/Physics/FireworkPhysics.cs
index 142a2e76c..119f2cf64 100644
--- a/MCGalaxy/Blocks/Physics/FireworkPhysics.cs
+++ b/MCGalaxy/Blocks/Physics/FireworkPhysics.cs
@@ -53,7 +53,6 @@ namespace MCGalaxy.Blocks.Physics {
}
static void Firework(ref PhysInfo C, int size, Level lvl, Random rand) {
- if (lvl.physics < 1 || lvl.physics == 5) return;
int rand1 = rand.Next(Block.Red, Block.White);
int rand2 = rand.Next(Block.Red, Block.White);
int min = Math.Min(rand1, rand2), max = Math.Max(rand1, rand2);
diff --git a/MCGalaxy/Blocks/Physics/LiquidPhysics.cs b/MCGalaxy/Blocks/Physics/LiquidPhysics.cs
index 6af18129d..30e2501b6 100644
--- a/MCGalaxy/Blocks/Physics/LiquidPhysics.cs
+++ b/MCGalaxy/Blocks/Physics/LiquidPhysics.cs
@@ -81,9 +81,7 @@ namespace MCGalaxy.Blocks.Physics {
case Block.Sand:
if (lvl.physics > 1) { //Adv physics changes sand to glass next to lava
- if (lvl.physics != 5) {
- lvl.AddUpdate(index, Block.Glass, default(PhysicsArgs));
- }
+ lvl.AddUpdate(index, Block.Glass, default(PhysicsArgs));
} else {
lvl.AddCheck(index);
} break;
diff --git a/MCGalaxy/Commands/Chat/CmdAdminChat.cs b/MCGalaxy/Commands/Chat/CmdAdminChat.cs
index ef8bafa3a..fe777ffa0 100644
--- a/MCGalaxy/Commands/Chat/CmdAdminChat.cs
+++ b/MCGalaxy/Commands/Chat/CmdAdminChat.cs
@@ -17,6 +17,7 @@ namespace MCGalaxy.Commands.Chatting {
public override string name { get { return "AdminChat"; } }
public override string shortcut { get { return "Admin"; } }
public override string type { get { return CommandTypes.Chat; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandPerm[] ExtraPerms {
get { return new[] { new CommandPerm(LevelPermission.Admin, "+ can read adminchat messages") }; }
}
diff --git a/MCGalaxy/Commands/Chat/CmdClear.cs b/MCGalaxy/Commands/Chat/CmdClear.cs
index 162fcf966..422402c3a 100644
--- a/MCGalaxy/Commands/Chat/CmdClear.cs
+++ b/MCGalaxy/Commands/Chat/CmdClear.cs
@@ -22,6 +22,7 @@ namespace MCGalaxy.Commands.Chatting {
public override string name { get { return "Clear"; } }
public override string shortcut { get { return "cls"; } }
public override string type { get { return CommandTypes.Chat; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("PlayerCLS"), new CommandAlias("GlobalCLS", "global"), new CommandAlias("gcls", "global") }; }
}
diff --git a/MCGalaxy/Commands/Chat/CmdMe.cs b/MCGalaxy/Commands/Chat/CmdMe.cs
index 4d8d50ac3..306fd4cce 100644
--- a/MCGalaxy/Commands/Chat/CmdMe.cs
+++ b/MCGalaxy/Commands/Chat/CmdMe.cs
@@ -23,6 +23,7 @@ namespace MCGalaxy.Commands.Chatting {
public override string name { get { return "Me"; } }
public override string type { get { return CommandTypes.Chat; } }
public override bool SuperUseable { get { return false; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override void Use(Player p, string message) {
if (message.Length == 0) { Player.Message(p, "You"); return; }
diff --git a/MCGalaxy/Commands/Chat/CmdOpChat.cs b/MCGalaxy/Commands/Chat/CmdOpChat.cs
index 4d51b6b74..0769ad56b 100644
--- a/MCGalaxy/Commands/Chat/CmdOpChat.cs
+++ b/MCGalaxy/Commands/Chat/CmdOpChat.cs
@@ -20,6 +20,7 @@ namespace MCGalaxy.Commands.Chatting {
public override string name { get { return "OpChat"; } }
public override string shortcut { get { return "Op"; } }
public override string type { get { return CommandTypes.Chat; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandPerm[] ExtraPerms {
get { return new[] { new CommandPerm(LevelPermission.Operator, "+ can read opchat messages") }; }
}
diff --git a/MCGalaxy/Commands/Chat/CmdRankMsg.cs b/MCGalaxy/Commands/Chat/CmdRankMsg.cs
index 8698f483b..def21c827 100644
--- a/MCGalaxy/Commands/Chat/CmdRankMsg.cs
+++ b/MCGalaxy/Commands/Chat/CmdRankMsg.cs
@@ -25,7 +25,8 @@ namespace MCGalaxy.Commands.Chatting {
public override string shortcut { get { return "rm"; } }
public override string type { get { return CommandTypes.Chat; } }
public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
if (message.Length == 0) { Help(p); return; }
if (!MessageCmd.CanSpeak(p, name)) return;
diff --git a/MCGalaxy/Commands/Chat/CmdSend.cs b/MCGalaxy/Commands/Chat/CmdSend.cs
index 02805e05b..be4e73277 100644
--- a/MCGalaxy/Commands/Chat/CmdSend.cs
+++ b/MCGalaxy/Commands/Chat/CmdSend.cs
@@ -24,7 +24,8 @@ namespace MCGalaxy.Commands.Chatting {
public override string name { get { return "Send"; } }
public override string type { get { return CommandTypes.Chat; } }
public override LevelPermission defaultRank { get { return LevelPermission.Builder; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
string[] parts = message.SplitSpaces(2);
if (message.Length == 0 || parts.Length == 1) { Help(p); return; }
diff --git a/MCGalaxy/Commands/Chat/CmdWhisper.cs b/MCGalaxy/Commands/Chat/CmdWhisper.cs
index 0c7669e25..06e26866b 100644
--- a/MCGalaxy/Commands/Chat/CmdWhisper.cs
+++ b/MCGalaxy/Commands/Chat/CmdWhisper.cs
@@ -20,7 +20,8 @@ namespace MCGalaxy.Commands.Chatting {
public override string name { get { return "Whisper"; } }
public override string type { get { return CommandTypes.Chat; } }
public override bool SuperUseable { get { return false; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
if (message.Length == 0) {
p.whisper = !p.whisper; p.whisperTo = "";
diff --git a/MCGalaxy/Commands/Command.cs b/MCGalaxy/Commands/Command.cs
index a27349340..12ef7e9ed 100644
--- a/MCGalaxy/Commands/Command.cs
+++ b/MCGalaxy/Commands/Command.cs
@@ -51,7 +51,9 @@ namespace MCGalaxy {
/// Whether this command is restricted in usage in message blocks.
/// Restricted commands require the player to have the extra permission for /mb to be able to be placed in message blocks.
public virtual bool MessageBlockRestricted { get { return false; } }
-
+ /// Whether this command can be used by players who are frozen.
+ public virtual bool UseableWhenFrozen { get { return false; } }
+
public static CommandList all = new CommandList();
public static CommandList core = new CommandList();
diff --git a/MCGalaxy/Commands/Information/CmdBanInfo.cs b/MCGalaxy/Commands/Information/CmdBanInfo.cs
index 0c8a7311b..ece18e0ee 100644
--- a/MCGalaxy/Commands/Information/CmdBanInfo.cs
+++ b/MCGalaxy/Commands/Information/CmdBanInfo.cs
@@ -21,7 +21,8 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdBanInfo : Command {
public override string name { get { return "BanInfo"; } }
public override string type { get { return CommandTypes.Moderation; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
if (CheckSuper(p, message, "player name")) return;
if (message.Length == 0) message = p.name;
diff --git a/MCGalaxy/Commands/Information/CmdBlocks.cs b/MCGalaxy/Commands/Information/CmdBlocks.cs
index a3612dfbe..aa36f7f59 100644
--- a/MCGalaxy/Commands/Information/CmdBlocks.cs
+++ b/MCGalaxy/Commands/Information/CmdBlocks.cs
@@ -24,6 +24,7 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdBlocks : Command {
public override string name { get { return "Blocks"; } }
public override string type { get { return CommandTypes.Information; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("Materials") }; }
}
diff --git a/MCGalaxy/Commands/Information/CmdClones.cs b/MCGalaxy/Commands/Information/CmdClones.cs
index 408351571..94fac1fb9 100644
--- a/MCGalaxy/Commands/Information/CmdClones.cs
+++ b/MCGalaxy/Commands/Information/CmdClones.cs
@@ -24,6 +24,7 @@ namespace MCGalaxy.Commands.Info {
public override string shortcut { get { return "Alts"; } }
public override string type { get { return CommandTypes.Information; } }
public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("WhoIP") }; }
}
diff --git a/MCGalaxy/Commands/Information/CmdCommands.cs b/MCGalaxy/Commands/Information/CmdCommands.cs
index ac21c9ebd..9c7bb1d58 100644
--- a/MCGalaxy/Commands/Information/CmdCommands.cs
+++ b/MCGalaxy/Commands/Information/CmdCommands.cs
@@ -20,6 +20,7 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "Commands"; } }
public override string shortcut { get { return "Cmds"; } }
public override string type { get { return CommandTypes.Information; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("CmdList") }; }
}
diff --git a/MCGalaxy/Commands/Information/CmdDevs.cs b/MCGalaxy/Commands/Information/CmdDevs.cs
index 2cf9530cd..4fbbadaeb 100644
--- a/MCGalaxy/Commands/Information/CmdDevs.cs
+++ b/MCGalaxy/Commands/Information/CmdDevs.cs
@@ -20,7 +20,8 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "Devs"; } }
public override string shortcut { get { return "Dev"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
if (message.Length > 0) { Help(p); return; }
Player.Message(p, "&9{1} devs: %S{0}", Server.Devs.Join(), Server.SoftwareName);
diff --git a/MCGalaxy/Commands/Information/CmdFaq.cs b/MCGalaxy/Commands/Information/CmdFaq.cs
index cb77c9bf6..7a1729c4b 100644
--- a/MCGalaxy/Commands/Information/CmdFaq.cs
+++ b/MCGalaxy/Commands/Information/CmdFaq.cs
@@ -21,7 +21,8 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdFaq : Command {
public override string name { get { return "FAQ"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
TextFile faqFile = TextFile.Files["FAQ"];
faqFile.EnsureExists();
diff --git a/MCGalaxy/Commands/Information/CmdHelp.cs b/MCGalaxy/Commands/Information/CmdHelp.cs
index b6d74d3e7..88456965f 100644
--- a/MCGalaxy/Commands/Information/CmdHelp.cs
+++ b/MCGalaxy/Commands/Information/CmdHelp.cs
@@ -22,6 +22,7 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdHelp : Command {
public override string name { get { return "Help"; } }
public override string type { get { return CommandTypes.Information; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("CmdHelp"), new CommandAlias("Ranks", "ranks"),
new CommandAlias("Colors", "colors"), new CommandAlias("Emotes", "emotes") }; }
diff --git a/MCGalaxy/Commands/Information/CmdLevels.cs b/MCGalaxy/Commands/Information/CmdLevels.cs
index c3fcafd2a..aa5e830a3 100644
--- a/MCGalaxy/Commands/Information/CmdLevels.cs
+++ b/MCGalaxy/Commands/Information/CmdLevels.cs
@@ -22,7 +22,8 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "Levels"; } }
public override string shortcut { get { return "Maps"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
Level[] loaded = LevelInfo.Loaded.Items;
Player.Message(p, "Loaded maps [physics level] (&c[no] %Sif not visitable): ");
diff --git a/MCGalaxy/Commands/Information/CmdMapInfo.cs b/MCGalaxy/Commands/Information/CmdMapInfo.cs
index 2c1a89e8d..1f46cb12d 100644
--- a/MCGalaxy/Commands/Information/CmdMapInfo.cs
+++ b/MCGalaxy/Commands/Information/CmdMapInfo.cs
@@ -30,6 +30,7 @@ namespace MCGalaxy.Commands.Info {
public override string shortcut { get { return "mi"; } }
public override string type { get { return CommandTypes.Information; } }
public override bool museumUsable { get { return false; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("WInfo"), new CommandAlias("WorldInfo") }; }
}
diff --git a/MCGalaxy/Commands/Information/CmdNews.cs b/MCGalaxy/Commands/Information/CmdNews.cs
index 922526e10..53a929c65 100644
--- a/MCGalaxy/Commands/Information/CmdNews.cs
+++ b/MCGalaxy/Commands/Information/CmdNews.cs
@@ -21,6 +21,7 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdNews : Command {
public override string name { get { return "News"; } }
public override string type { get { return CommandTypes.Information; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override void Use(Player p, string message) {
TextFile newsText = TextFile.Files["News"];
diff --git a/MCGalaxy/Commands/Information/CmdOpRules.cs b/MCGalaxy/Commands/Information/CmdOpRules.cs
index d07d18cc6..fe9ae4013 100644
--- a/MCGalaxy/Commands/Information/CmdOpRules.cs
+++ b/MCGalaxy/Commands/Information/CmdOpRules.cs
@@ -21,7 +21,8 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdOpRules : Command {
public override string name { get { return "OpRules"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
TextFile oprulesFile = TextFile.Files["OpRules"];
oprulesFile.EnsureExists();
diff --git a/MCGalaxy/Commands/Information/CmdOpStats.cs b/MCGalaxy/Commands/Information/CmdOpStats.cs
index c58b6b998..1ec42b0bc 100644
--- a/MCGalaxy/Commands/Information/CmdOpStats.cs
+++ b/MCGalaxy/Commands/Information/CmdOpStats.cs
@@ -26,6 +26,7 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdOpStats : Command {
public override string name { get { return "OpStats"; } }
public override string type { get { return CommandTypes.Information; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override void Use(Player p, string message) {
string end = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
diff --git a/MCGalaxy/Commands/Information/CmdPClients.cs b/MCGalaxy/Commands/Information/CmdPClients.cs
index b204d7bed..ca913e2e5 100644
--- a/MCGalaxy/Commands/Information/CmdPClients.cs
+++ b/MCGalaxy/Commands/Information/CmdPClients.cs
@@ -24,7 +24,8 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "PClients"; } }
public override string shortcut { get { return "Clients"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
Dictionary> clients = new Dictionary>();
Player[] online = PlayerInfo.Online.Items;
diff --git a/MCGalaxy/Commands/Information/CmdRankInfo.cs b/MCGalaxy/Commands/Information/CmdRankInfo.cs
index ae834d4bb..dedba80a6 100644
--- a/MCGalaxy/Commands/Information/CmdRankInfo.cs
+++ b/MCGalaxy/Commands/Information/CmdRankInfo.cs
@@ -25,7 +25,8 @@ namespace MCGalaxy.Commands.Info {
public override string shortcut { get { return "ri"; } }
public override string type { get { return CommandTypes.Moderation; } }
public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
if (CheckSuper(p, message, "player name")) return;
if (message.Length == 0) message = p.name;
diff --git a/MCGalaxy/Commands/Information/CmdSearch.cs b/MCGalaxy/Commands/Information/CmdSearch.cs
index 291861547..7a56dd163 100644
--- a/MCGalaxy/Commands/Information/CmdSearch.cs
+++ b/MCGalaxy/Commands/Information/CmdSearch.cs
@@ -25,7 +25,8 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "Search"; } }
public override string type { get { return CommandTypes.Information; } }
public override LevelPermission defaultRank { get { return LevelPermission.Builder; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
string[] args = message.SplitSpaces(3);
if (args.Length < 2) { Help(p); return; }
diff --git a/MCGalaxy/Commands/Information/CmdSeen.cs b/MCGalaxy/Commands/Information/CmdSeen.cs
index 9ad2526a7..8c4663964 100644
--- a/MCGalaxy/Commands/Information/CmdSeen.cs
+++ b/MCGalaxy/Commands/Information/CmdSeen.cs
@@ -22,7 +22,8 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdSeen : Command {
public override string name { get { return "Seen"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
if (message.Length == 0) { Help(p); return; }
diff --git a/MCGalaxy/Commands/Information/CmdServerInfo.cs b/MCGalaxy/Commands/Information/CmdServerInfo.cs
index 5c9ff0a59..4216283cc 100644
--- a/MCGalaxy/Commands/Information/CmdServerInfo.cs
+++ b/MCGalaxy/Commands/Information/CmdServerInfo.cs
@@ -25,6 +25,7 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "ServerInfo"; } }
public override string shortcut { get { return "SInfo"; } }
public override string type { get { return CommandTypes.Information; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("Host"), new CommandAlias("ZAll") }; }
}
diff --git a/MCGalaxy/Commands/Information/CmdTime.cs b/MCGalaxy/Commands/Information/CmdTime.cs
index 3a6f2b48e..4ada1946a 100644
--- a/MCGalaxy/Commands/Information/CmdTime.cs
+++ b/MCGalaxy/Commands/Information/CmdTime.cs
@@ -23,7 +23,8 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "Time"; } }
public override string shortcut { get { return "ti"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
Player.Message(p, "Server time: {0:HH:mm:ss} on {0:d}", DateTime.Now);
if (!Server.zombie.Running) return;
diff --git a/MCGalaxy/Commands/Information/CmdView.cs b/MCGalaxy/Commands/Information/CmdView.cs
index a3e66cc61..4b6a578e3 100644
--- a/MCGalaxy/Commands/Information/CmdView.cs
+++ b/MCGalaxy/Commands/Information/CmdView.cs
@@ -22,7 +22,8 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdView : Command {
public override string name { get { return "View"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
if (!Directory.Exists("extra/text/"))
Directory.CreateDirectory("extra/text");
diff --git a/MCGalaxy/Commands/Information/CmdViewRanks.cs b/MCGalaxy/Commands/Information/CmdViewRanks.cs
index 5cf035906..fcf2b779a 100644
--- a/MCGalaxy/Commands/Information/CmdViewRanks.cs
+++ b/MCGalaxy/Commands/Information/CmdViewRanks.cs
@@ -23,6 +23,7 @@ namespace MCGalaxy.Commands.Info {
public sealed class CmdViewRanks : Command {
public override string name { get { return "ViewRanks"; } }
public override string type { get { return CommandTypes.Information; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("Ops", "operator"), new CommandAlias("Admins", "superop"),
new CommandAlias("Banned", "banned"), new CommandAlias("BanList", "banned") }; }
diff --git a/MCGalaxy/Commands/Information/CmdWhoNick.cs b/MCGalaxy/Commands/Information/CmdWhoNick.cs
index a00b25d54..46121f02d 100644
--- a/MCGalaxy/Commands/Information/CmdWhoNick.cs
+++ b/MCGalaxy/Commands/Information/CmdWhoNick.cs
@@ -23,7 +23,8 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "WhoNick"; } }
public override string shortcut { get { return "RealName"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
if (message.Length == 0) { Help(p); return; }
Player nick = FindNick(p, message);
diff --git a/MCGalaxy/Commands/Information/CmdWhois.cs b/MCGalaxy/Commands/Information/CmdWhois.cs
index 7919f05aa..216264d3c 100644
--- a/MCGalaxy/Commands/Information/CmdWhois.cs
+++ b/MCGalaxy/Commands/Information/CmdWhois.cs
@@ -23,6 +23,7 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "WhoIs"; } }
public override string shortcut { get { return "WhoWas"; } }
public override string type { get { return CommandTypes.Information; } }
+ public override bool UseableWhenFrozen { get { return true; } }
public override CommandPerm[] ExtraPerms {
get { return new[] { new CommandPerm(LevelPermission.AdvBuilder, "+ can see player's IP and if on whitelist") }; }
}
diff --git a/MCGalaxy/Commands/Information/CmdWorlds.cs b/MCGalaxy/Commands/Information/CmdWorlds.cs
index c2b98295f..c6a737bef 100644
--- a/MCGalaxy/Commands/Information/CmdWorlds.cs
+++ b/MCGalaxy/Commands/Information/CmdWorlds.cs
@@ -25,7 +25,8 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "Worlds"; } }
public override string shortcut { get { return "Unloaded"; } }
public override string type { get { return CommandTypes.Information; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
string[] files = LevelInfo.AllMapFiles();
Player.Message(p, "Maps (&c[no] %Sif not visitable): ");
diff --git a/MCGalaxy/Commands/Moderation/ZoneCmds.cs b/MCGalaxy/Commands/Moderation/ZoneCmds.cs
index 7539893a5..0b757681f 100644
--- a/MCGalaxy/Commands/Moderation/ZoneCmds.cs
+++ b/MCGalaxy/Commands/Moderation/ZoneCmds.cs
@@ -161,7 +161,7 @@ namespace MCGalaxy.Commands.Moderation {
public override string shortcut { get { return "ZTest"; } }
public override string type { get { return CommandTypes.Moderation; } }
public override bool museumUsable { get { return false; } }
-
+
public override void Use(Player p, string message) {
Player.Message(p, "Place or delete a block where you would like to check for zones.");
p.MakeSelection(1, null, TestZone);
@@ -197,7 +197,8 @@ namespace MCGalaxy.Commands.Moderation {
public override string shortcut { get { return "Zones"; } }
public override string type { get { return CommandTypes.Moderation; } }
public override bool museumUsable { get { return false; } }
-
+ public override bool UseableWhenFrozen { get { return true; } }
+
public override void Use(Player p, string message) {
Zone[] zones = p.level.Zones.Items;
MultiPageOutput.Output(p, zones, FormatZone, "ZoneList", "zones", message, true);
diff --git a/MCGalaxy/CorePlugin/MiscHandlers.cs b/MCGalaxy/CorePlugin/MiscHandlers.cs
index 7e5a3a55f..daef6edbf 100644
--- a/MCGalaxy/CorePlugin/MiscHandlers.cs
+++ b/MCGalaxy/CorePlugin/MiscHandlers.cs
@@ -68,7 +68,7 @@ namespace MCGalaxy.Core {
p.aiming = false;
p.ClearBlockchange();
}
- if (!p.level.Config.UseBlockDB) {
+ if (!level.Config.UseBlockDB) {
Player.Message(p, "BlockDB is disabled here, &cyou will not be able to /undo or /redo");
}
}
diff --git a/MCGalaxy/Player/Player.Handlers.cs b/MCGalaxy/Player/Player.Handlers.cs
index a842d8e55..37aaa79ad 100644
--- a/MCGalaxy/Player/Player.Handlers.cs
+++ b/MCGalaxy/Player/Player.Handlers.cs
@@ -742,6 +742,9 @@ namespace MCGalaxy {
if (level.IsMuseum && !command.museumUsable ) {
SendMessage("Cannot use this command while in a museum."); return null;
}
+ if (frozen && !command.UseableWhenFrozen) {
+ SendMessage("Cannot use this command while frozen."); return null;
+ }
return command;
}