<divclass="inheritance"title="Inheritance Tree"><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">java.lang.Object</a>
<dd><ahref="LootContext.html"title="class in org.bukkit.loot">LootContext</a></dd>
</dl>
<hr>
<divclass="type-signature"><spanclass="modifiers">public static class </span><spanclass="element-name type-name-label">LootContext.Builder</span>
<spanclass="extends-implements">extends <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></span></div>
<divclass="block">Utility class to make building <ahref="LootContext.html"title="class in org.bukkit.loot"><code>LootContext</code></a> easier. The only
required argument is <ahref="../Location.html"title="class in org.bukkit"><code>Location</code></a> with a valid (non-null)
<ahref="../World.html"title="interface in org.bukkit"><code>World</code></a>.</div>
<divclass="col-constructor-name even-row-color"><code><ahref="#%3Cinit%3E(org.bukkit.Location)"class="member-name-link">Builder</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../Location.html"title="class in org.bukkit">Location</a> location)</code></div>
<divclass="col-last even-row-color">
<divclass="block">Creates a new LootContext.Builder instance to facilitate easy
creation of <ahref="LootContext.html"title="class in org.bukkit.loot"><code>LootContext</code></a>s.</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.html"title="class in org.bukkit.loot">LootContext</a></code></div>
<divclass="block">Create a new <ahref="LootContext.html"title="class in org.bukkit.loot"><code>LootContext</code></a> instance using the supplied
parameters.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.Builder.html"title="class in org.bukkit.loot">LootContext.Builder</a></code></div>
<divclass="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#killer(org.bukkit.entity.HumanEntity)"class="member-name-link">killer</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../entity/HumanEntity.html"title="interface in org.bukkit.entity">HumanEntity</a> killer)</code></div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.Builder.html"title="class in org.bukkit.loot">LootContext.Builder</a></code></div>
<divclass="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="#lootedEntity(org.bukkit.entity.Entity)"class="member-name-link">lootedEntity</a><wbr>(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../entity/Entity.html"title="interface in org.bukkit.entity">Entity</a> lootedEntity)</code></div>
<divclass="block">The entity that was killed.</div>
</div>
<divclass="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.Builder.html"title="class in org.bukkit.loot">LootContext.Builder</a></code></div>
<divclass="block">Set the <ahref="../enchantments/Enchantment.html#LOOT_BONUS_MOBS"><code>Enchantment.LOOT_BONUS_MOBS</code></a>
level equivalent to use when generating loot.</div>
</div>
<divclass="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.Builder.html"title="class in org.bukkit.loot">LootContext.Builder</a></code></div>
<divclass="block">Set how much luck to have when generating loot.</div>
</div>
</div>
</div>
</div>
<divclass="inherited-list">
<h3id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html"title="class or interface in java.lang"class="external-link">Object</a></h3>
<code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()"title="class or interface in java.lang"class="external-link">clone</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)"title="class or interface in java.lang"class="external-link">equals</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()"title="class or interface in java.lang"class="external-link">finalize</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()"title="class or interface in java.lang"class="external-link">getClass</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()"title="class or interface in java.lang"class="external-link">hashCode</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()"title="class or interface in java.lang"class="external-link">notify</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()"title="class or interface in java.lang"class="external-link">notifyAll</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()"title="class or interface in java.lang"class="external-link">toString</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)"title="class or interface in java.lang"class="external-link">wait</a>, <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)"title="class or interface in java.lang"class="external-link">wait</a></code></div>
<divclass="member-signature"><spanclass="modifiers">public</span> <spanclass="element-name">Builder</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="../Location.html"title="class in org.bukkit">Location</a> location)</span></div>
<divclass="block">Creates a new LootContext.Builder instance to facilitate easy
creation of <ahref="LootContext.html"title="class in org.bukkit.loot"><code>LootContext</code></a>s.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>location</code> - the location the LootContext should use</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<sectionclass="method-details"id="method-detail">
<h2>Method Details</h2>
<ulclass="member-list">
<li>
<sectionclass="detail"id="luck(float)">
<h3>luck</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.Builder.html"title="class in org.bukkit.loot">LootContext.Builder</a></span> <spanclass="element-name">luck</span><wbr><spanclass="parameters">(float luck)</span></div>
<divclass="block">Set how much luck to have when generating loot.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>luck</code> - the luck level</dd>
<dt>Returns:</dt>
<dd>the Builder</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="lootingModifier(int)">
<h3>lootingModifier</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.Builder.html"title="class in org.bukkit.loot">LootContext.Builder</a></span> <spanclass="element-name">lootingModifier</span><wbr><spanclass="parameters">(int modifier)</span></div>
<divclass="block">Set the <ahref="../enchantments/Enchantment.html#LOOT_BONUS_MOBS"><code>Enchantment.LOOT_BONUS_MOBS</code></a>
level equivalent to use when generating loot. Values less than or
equal to 0 will force the <ahref="LootTable.html"title="interface in org.bukkit.loot"><code>LootTable</code></a> to only return a single
<ahref="../inventory/ItemStack.html"title="class in org.bukkit.inventory"><code>ItemStack</code></a> per pool.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>modifier</code> - the looting level modifier</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.Builder.html"title="class in org.bukkit.loot">LootContext.Builder</a></span> <spanclass="element-name">lootedEntity</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../entity/Entity.html"title="interface in org.bukkit.entity">Entity</a> lootedEntity)</span></div>
<divclass="block">The entity that was killed.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>lootedEntity</code> - the looted entity</dd>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.Builder.html"title="class in org.bukkit.loot">LootContext.Builder</a></span> <spanclass="element-name">killer</span><wbr><spanclass="parameters">(<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a>
<ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/Nullable.html"title="class or interface in org.jetbrains.annotations"class="external-link">@Nullable</a><ahref="../entity/HumanEntity.html"title="interface in org.bukkit.entity">HumanEntity</a> killer)</span></div>
<divclass="block">Set the <ahref="../entity/HumanEntity.html"title="interface in org.bukkit.entity"><code>HumanEntity</code></a> that killed
<ahref="LootContext.html#getLootedEntity()"><code>LootContext.getLootedEntity()</code></a>. This entity will be used to get the
looting level if <ahref="#lootingModifier(int)"><code>lootingModifier(int)</code></a> is not set.</div>
<dlclass="notes">
<dt>Parameters:</dt>
<dd><code>killer</code> - the killer entity</dd>
<dt>Returns:</dt>
<dd>the Builder</dd>
</dl>
</section>
</li>
<li>
<sectionclass="detail"id="build()">
<h3>build</h3>
<divclass="member-signature"><spanclass="annotations"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a>
</span><spanclass="modifiers">public</span> <spanclass="return-type"><ahref="https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/org/jetbrains/annotations/NotNull.html"title="class or interface in org.jetbrains.annotations"class="external-link">@NotNull</a><ahref="LootContext.html"title="class in org.bukkit.loot">LootContext</a></span> <spanclass="element-name">build</span>()</div>
<divclass="block">Create a new <ahref="LootContext.html"title="class in org.bukkit.loot"><code>LootContext</code></a> instance using the supplied
parameters.</div>
<dlclass="notes">
<dt>Returns:</dt>
<dd>a new <ahref="LootContext.html"title="class in org.bukkit.loot"><code>LootContext</code></a> instance</dd>