fix physics blocks losing block permissions from recent commits

This commit is contained in:
UnknownShadow200 2017-09-24 09:07:42 +10:00
parent 48f3e1486d
commit 4328ff25e2

View File

@ -153,11 +153,14 @@ namespace MCGalaxy.Blocks {
//Name/ID : Lowest : Disallow : Allow
line.Replace(" ", "").FixedSplit(args, ':');
byte block = Block.Byte(args[0]);
byte block;
if (!byte.TryParse(args[0], out block)) {
block = Block.Byte(args[0]);
}
if (block == Block.Invalid) continue;
BlockPerms perms = new BlockPerms();
perms.BlockID = block;
try {
perms.MinRank = (LevelPermission)int.Parse(args[1]);
string disallowRaw = args[2], allowRaw = args[3];