<liclass="toctree-l3"><aclass="reference internal"href="../setup-tools.html#get-the-mobase-stubs">1. Get the <codeclass="docutils literal notranslate"><spanclass="pre">mobase</span></code> stubs</a></li>
<liclass="toctree-l3"><aclass="reference internal"href="../setup-tools.html#configure-visual-studio-code-for-mobase">2. Configure Visual Studio Code for <codeclass="docutils literal notranslate"><spanclass="pre">mobase</span></code></a></li>
<liclass="toctree-l3"><aclass="reference internal"href="../setup-tools.html#configure-mypy-to-find-the-mobase-stubs">3. Configure <codeclass="docutils literal notranslate"><spanclass="pre">mypy</span></code> to find the <codeclass="docutils literal notranslate"><spanclass="pre">mobase</span></code> stubs</a></li>
</ul>
</li>
<liclass="toctree-l2"><aclass="reference internal"href="../setup-tools.html#testing-the-setup">Testing the setup</a></li>
</ul>
</li>
<liclass="toctree-l1"><aclass="reference internal"href="../plugin-types.html">Type of Plugins</a><ul>
<liclass="toctree-l2"><aclass="reference internal"href="../faq.html#why-is-mo2-throwing-an-exception-when-i-try-to-create-a-type-inheriting-one-of-mo2-class">1. Why is MO2 throwing an exception when I try to create a type inheriting one of MO2 class?</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="../faq.html#how-can-i-be-sure-to-implement-all-the-required-methods-when-creating-a-plugin">2. How can I be sure to implement all the required methods when creating a plugin?</a></li>
<liclass="toctree-l2"><aclass="reference internal"href="../faq.html#why-are-my-isinstance-x-qobject-and-isinstance-y-qwidget-not-working">3. Why are my <codeclass="docutils literal notranslate"><spanclass="pre">isinstance(x,</span><spanclass="pre">QObject)</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">isinstance(y,</span><spanclass="pre">QWidget)</span></code> not working?</a></li>
<h1>IPluginList<aclass="headerlink"href="#ipluginlist"title="Permalink to this headline">¶</a></h1>
<dlclass="class">
<dtid="mobase.IPluginList">
<emclass="property">class </em><codeclass="sig-prename descclassname">mobase.</code><codeclass="sig-name descname">IPluginList</code><aclass="headerlink"href="#mobase.IPluginList"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">isMaster</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.isMaster"title="Permalink to this definition">¶</a></dt>
<dd><p>Check if a plugin is a master file (basically a library, referenced by other plugins).</p>
<p>In gamebryo games, a master file will usually have a .esm file extension but technically
an esp can be flagged as master and an esm might not be.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Filename of the plugin (without path but with file extension).</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the given plugin is a master plugin, False otherwise or if the file does not exist.</p>
<codeclass="sig-name descname">loadOrder</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.loadOrder"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the load order of a plugin.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Filename of the plugin (without path but with file extension).</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The load order of the plugin (the order in which the game loads it). If all plugins are enabled this</p>
</dd>
</dl>
<p>is the same as the priority but disabled plugins will have a load order of -1. This also returns -1
<codeclass="sig-name descname">masters</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.masters"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the list of masters required for a plugin.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Filename of the plugin (without path but with file extension).</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The list of masters for the plugin (filenames with extension, no path).</p>
<codeclass="sig-name descname">onPluginMoved</code><spanclass="sig-paren">(</span><emclass="sig-param">callback</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.onPluginMoved"title="Permalink to this definition">¶</a></dt>
<dd><p>Install a new handler to be called when a plugin is moved.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>callback</strong>– The function to call when a plugin is moved. The first parameter is the plugin name, the second the old priority of the plugin and the third one the new priority.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the handler was installed properly (there are currently no reasons for this to fail).</p>
<codeclass="sig-name descname">onRefreshed</code><spanclass="sig-paren">(</span><emclass="sig-param">callback</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.onRefreshed"title="Permalink to this definition">¶</a></dt>
<dd><p>Install a new handler to be called when the list of plugins is refreshed.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>callback</strong>– The function to call when the list of plugins is refreshed.</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>True if the handler was installed properly (there are currently no reasons for this to fail).</p>
<codeclass="sig-name descname">origin</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.origin"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the origin of a plugin. This is either the (internal) name of a mod, <cite>“overwrite”</cite> or <cite>“data”</cite>.</p>
<p>The internal name of a mod can differ from the display name for disambiguation.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Filename of the plugin (without path but with file extension).</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The name of the origin of the plugin, or an empty string if the plugin does not exist.</p>
<codeclass="sig-name descname">pluginNames</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.pluginNames"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>The list of all plugin names.</p>
<codeclass="sig-name descname">priority</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.priority"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the priority of a plugin.</p>
<p>The higher the priority, the more important.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Filename of the plugin (without path but with file extension).</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The priority of the given plugin, or -1 if the plugin does not exist.</p>
<codeclass="sig-name descname">setLoadOrder</code><spanclass="sig-paren">(</span><emclass="sig-param">loadorder</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.setLoadOrder"title="Permalink to this definition">¶</a></dt>
<dd><p>Set the load order.</p>
<p>Plugins not included in the list will be placed at highest priority in the order they
were before.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>loadorder</strong>– The new load order, specified by the list of plugin names, sorted.</p>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IPluginList.setState">
<codeclass="sig-name descname">setState</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em>, <emclass="sig-param">state</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.setState"title="Permalink to this definition">¶</a></dt>
<dd><p>Set the state of a plugin.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>name</strong>– Filename of the plugin (without path but with file extension).</p></li>
<li><p><strong>state</strong>– New state of the plugin (<cite>INACTIVE</cite> or <cite>ACTIVE</cite>).</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="mobase.IPluginList.state">
<codeclass="sig-name descname">state</code><spanclass="sig-paren">(</span><emclass="sig-param">name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#mobase.IPluginList.state"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieve the state of a plugin.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>name</strong>– Filename of the plugin (without path but with file extension).</p>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>The state of the plugin.</p>