Fix being able to maintain /fly from a previous map into a no-fly map.

This commit is contained in:
UnknownShadow200 2017-02-17 20:59:27 +11:00
parent 31f51e6679
commit cccf68549f
2 changed files with 9 additions and 5 deletions

View File

@ -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 {

View File

@ -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))