Fix being able to use /lb edit on global block definitions. (Thanks goodlyay)

This commit is contained in:
UnknownShadow200 2016-01-27 22:27:08 +11:00
parent f6b073f7cc
commit 9d91bab10d

View File

@ -256,6 +256,7 @@ namespace MCGalaxy.Commands {
if (!CheckBlockId(p, parts[1], global, out blockId)) return;
BlockDefinition[] defs = global ? BlockDefinition.GlobalDefs : p.level.CustomBlockDefs;
BlockDefinition def = defs[blockId];
if (!global && def == BlockDefinition.GlobalDefs[blockId]) def = null;
if (def == null) { MessageNoBlock(p, global); return; }
string value = parts[3];