diff --git a/Commands/Moderation/CmdReveal.cs b/Commands/Moderation/CmdReveal.cs index b9a9c8cba..76aad6db1 100644 --- a/Commands/Moderation/CmdReveal.cs +++ b/Commands/Moderation/CmdReveal.cs @@ -50,7 +50,7 @@ namespace MCGalaxy.Commands { foreach (Player who in Player.players.ToArray()) { if (who.level == lvl) - ReloadMap(p, who); + ReloadMap(p, who, true); } } else { Player who = Player.Find(parts[0]); @@ -59,13 +59,13 @@ namespace MCGalaxy.Commands { } else if (who.group.Permission > p.group.Permission && p != who) { Player.SendMessage(p, "Cannot reload the map of someone higher than you."); return; } - ReloadMap(p, who); + ReloadMap(p, who, true); } GC.Collect(); GC.WaitForPendingFinalizers(); } - void ReloadMap(Player p, Player who) { + internal static void ReloadMap(Player p, Player who, bool showMessage) { who.Loading = true; foreach (Player pl in Player.players.ToArray()) if (who.level == pl.level && who != pl) who.SendDespawn(pl.id); foreach (PlayerBot b in PlayerBot.playerbots.ToArray()) if (who.level == b.level) who.SendDespawn(b.id); @@ -89,6 +89,7 @@ namespace MCGalaxy.Commands { who.Loading = false; + if (!showMessage) return; if (p != null && !p.hidden) { who.SendMessage("&bMap reloaded by " + p.name); } if (p != null && p.hidden) { who.SendMessage("&bMap reloaded"); } Player.SendMessage(p, "&4Finished reloading for " + who.name); diff --git a/Commands/World/CmdEnvironment.cs b/Commands/World/CmdEnvironment.cs index 3e39e5ae1..c4b57bb69 100644 --- a/Commands/World/CmdEnvironment.cs +++ b/Commands/World/CmdEnvironment.cs @@ -258,10 +258,10 @@ namespace MCGalaxy.Commands { p.level.LightColor = preset.Sun; if (CaselessEquals( value, "normal")) { - Command.all.Find("env").Use(p, "l weather 0"); - Command.all.Find("env").Use(p, "l water normal"); - Command.all.Find("env").Use(p, "l bedrock normal"); - Command.all.Find("env").Use(p, "l level normal"); + Command.all.Find("env").Use(p, "weather 0"); + Command.all.Find("env").Use(p, "water normal"); + Command.all.Find("env").Use(p, "bedrock normal"); + Command.all.Find("env").Use(p, "level normal"); } return true; } else { diff --git a/Commands/World/CmdReload.cs b/Commands/World/CmdReload.cs index 26223c51c..b5468bf3a 100644 --- a/Commands/World/CmdReload.cs +++ b/Commands/World/CmdReload.cs @@ -15,7 +15,9 @@ or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses. */ +using System.Collections.Generic; using System.IO; + namespace MCGalaxy.Commands { public sealed class CmdReload : Command { @@ -42,21 +44,13 @@ namespace MCGalaxy.Commands { foreach (Player pl in Player.players) { if (pl.level.name.ToLower() != name.ToLower()) continue; - - if (p != null) - p.ignorePermission = true; - Command.all.Find("unload").Use(p, name); - Command.all.Find("load").Use(p, name); - Command.all.Find("goto").Use(pl, name); + CmdReveal.ReloadMap(p, pl, false); } Player.GlobalMessage("&cThe map, " + name + " has been reloaded!"); Server.IRC.Say("The map, " + name + " has been reloaded."); string src = p == null ? "the console" : p.name; Server.s.Log("The map " + name + " was reloaded by " + src); - if (p != null ) - p.ignorePermission = false; - return; } public override void Help(Player p) { diff --git a/Player/Player.cs b/Player/Player.cs index a8297f642..88d7b9da3 100644 --- a/Player/Player.cs +++ b/Player/Player.cs @@ -2306,12 +2306,9 @@ return; } else if (self) { - if (!p.ignorePermission) - { - p.pos = new ushort[3] { x, y, z }; p.rot = new byte[2] { rotx, roty }; - p.oldpos = p.pos; p.basepos = p.pos; p.oldrot = p.rot; - p.SendSpawn(0xFF, from.color + from.name + possession, x, y, z, rotx, roty); - } + p.pos = new ushort[3] { x, y, z }; p.rot = new byte[2] { rotx, roty }; + p.oldpos = p.pos; p.basepos = p.pos; p.oldrot = p.rot; + p.SendSpawn(0xFF, from.color + from.name + possession, x, y, z, rotx, roty); } }); }