From cccf68549f51138f600dd839606aca3e4d9b663f Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 17 Feb 2017 20:59:27 +1100 Subject: [PATCH] Fix being able to maintain /fly from a previous map into a no-fly map. --- MCGalaxy/Config/ServerProperties.cs | 9 ++++----- MCGalaxy/CorePlugin/LevelHandler.cs | 5 +++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/MCGalaxy/Config/ServerProperties.cs b/MCGalaxy/Config/ServerProperties.cs index 31a379a79..ff9c8a722 100644 --- a/MCGalaxy/Config/ServerProperties.cs +++ b/MCGalaxy/Config/ServerProperties.cs @@ -15,11 +15,10 @@ or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses. */ -using System; -using System.IO; -using System.Security.Cryptography; -using System.Text; -using MCGalaxy.SQL; +using System; +using System.IO; +using System.Security.Cryptography; +using MCGalaxy.SQL; namespace MCGalaxy { diff --git a/MCGalaxy/CorePlugin/LevelHandler.cs b/MCGalaxy/CorePlugin/LevelHandler.cs index 84be9a72b..266796f71 100644 --- a/MCGalaxy/CorePlugin/LevelHandler.cs +++ b/MCGalaxy/CorePlugin/LevelHandler.cs @@ -27,6 +27,11 @@ namespace MCGalaxy.Core { p.showPortals = false; p.ModelBB = AABB.ModelAABB(p.model, level); // in case had been using a level-only custom block for their model + if (!Hacks.CanUseHacks(p, level)) { + Player.Message(p, "You cannot use /fly on this map."); + p.isFlying = false; + } + if (p.HasCpeExt(CpeExt.EnvWeatherType)) p.Send(Packet.EnvWeatherType((byte)level.Weather)); if (p.HasCpeExt(CpeExt.EnvColors))