protected BaseRole(BasePlugin plugin) { var guid = MetadataHelper.GetMetadata(plugin).GUID; if (!RoleManager.Roles.ContainsKey(guid)) { RoleManager.Roles.Add(guid, new Dictionary <byte, BaseRole>()); } Dictionary <byte, BaseRole> localRoles = RoleManager.Roles[guid]; Data = new RoleData(guid, (byte)localRoles.Count); localRoles.Add((byte)localRoles.Count, this); RoleManager.Roles[guid] = localRoles; RoleManager.Limits.Add(this, 0); OptionsManager.AddLimitOptionIfNecessary(this, guid); }