You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanclass="sig-name descname"><spanclass="pre">getNbt</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><aclass="reference internal" href="nbt.html#mcpq.nbt.NbtCompound" title="mcpq.nbt._types.NbtCompound"><spanclass="pre">NbtCompound</span></a><spanclass="w"></span><spanclass="p"><spanclass="pre">|</span></span><spanclass="w"></span><spanclass="pre">None</span></span></span><aclass="headerlink" href="#mcpq.entity.Entity.getNbt" title="Link to this definition">¶</a></dt>
161
+
<dd><p>Get the entity’s NBT data as <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">NBT</span></code> or None if the entity is not loaded. The data is not cached NBT data is always queried on call.</p>
162
+
<divclass="admonition caution">
163
+
<pclass="admonition-title">Caution</p>
164
+
<p>This function requires command output captuing.
165
+
The plugin that is built against the <codeclass="docutils literal notranslate"><spanclass="pre">spigot-Bukkit</span><spanclass="pre">API</span></code> does <em>not</em> fully support the return of command output.</p>
<spanclass="sig-name descname"><spanclass="pre">giveEffect</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">effect</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">str</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">seconds</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">int</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">0</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">amplifier</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">int</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">0</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">particles</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><spanclass="pre">bool</span></span><spanclass="w"></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="default_value"><spanclass="pre">True</span></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">None</span></span></span><aclass="headerlink" href="#mcpq.entity.Entity.giveEffect" title="Link to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span><spanclass="w"></span></em><spanclass="sig-name descname"><spanclass="pre">MaterialFilter</span></span><aclass="headerlink" href="#mcpq.material.MaterialFilter" title="Link to this definition">¶</a></dt>
47
-
<dd><p>The <aclass="reference internal" href="#mcpq.material.MaterialFilter" title="mcpq.material.MaterialFilter"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MaterialFilter</span></code></a>filteres materials, which includes types of blocks, items and other materials, by querying the server.
47
+
<dd><p>The <aclass="reference internal" href="#mcpq.material.MaterialFilter" title="mcpq.material.MaterialFilter"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MaterialFilter</span></code></a>filters materials, which includes types of blocks, items and other materials, by querying the server.
48
48
The exact materials that are available depend on the Minecraft version and plugins/mods that are installed on the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Minecraft</span></code> instance.</p>
49
49
<p>Typically, we would like to get a certain subtype of material, which can be filtered directly on this class. Once we have done this, we can iterate over it, return a list of applied filters or choose a random block from the filtered materials:</p>
<p>Most filteres can be inverted, either directly, e.g., <codeclass="docutils literal notranslate"><spanclass="pre">mc.materials.item(False)</span></code> to get all non-item materials, or by using the inverted keyword for string filters, e.g., <codeclass="docutils literal notranslate"><spanclass="pre">mc.materials.contains("yellow",</span><spanclass="pre">"orange",</span><spanclass="pre">negate=True)</span></code> to get all materials that do not contain the words yellow or orange.</p>
79
+
<p>Most filters can be inverted, either directly, e.g., <codeclass="docutils literal notranslate"><spanclass="pre">mc.materials.item(False)</span></code> to get all non-item materials, or by using the inverted keyword for string filters, e.g., <codeclass="docutils literal notranslate"><spanclass="pre">mc.materials.contains("yellow",</span><spanclass="pre">"orange",</span><spanclass="pre">negate=True)</span></code> to get all materials that do not contain the words yellow or orange.</p>
80
80
<p>Additionally, filters can be combined in a number of ways.
81
81
Let’s say we want to get all block types that contain the words “wool” or “concrete” but NOT the word “yellow”. There are multiple ways how we could filter the material list:</p>
@@ -253,8 +253,8 @@ <h1>Materials and Entity-Types<a class="headerlink" href="#materials-and-entity-
253
253
<dd><p>Works the same as <aclass="reference internal" href="#mcpq.material.MaterialFilter" title="mcpq.material.MaterialFilter"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MaterialFilter</span></code></a> only for entity-types instead.</p>
254
254
<divclass="admonition note">
255
255
<pclass="admonition-title">Note</p>
256
-
<p>The interface and functions for entities is very similar to blocks, such that we are aliasing <aclass="reference internal" href="block.html#mcpq.nbt.EntityType" title="mcpq.nbt.EntityType"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EntityType</span></code></a> to <aclass="reference internal" href="block.html#mcpq.nbt.Block" title="mcpq.nbt.Block"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Block</span></code></a> at the moment.
257
-
If at a later point the functionality between the two diverges then we will split the classes as well.</p>
256
+
<p>The interface and functions for entities is very similar to blocks, such that <aclass="reference internal" href="block.html#mcpq.nbt.EntityType" title="mcpq.nbt.EntityType"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">EntityType</span></code></a> is aliased to <aclass="reference internal" href="block.html#mcpq.nbt.Block" title="mcpq.nbt.Block"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Block</span></code></a> at the moment.
257
+
If at a later point the functionality between the two diverges then the classes will split up.</p>
0 commit comments