From 1e4669e8be7602e99a3b8bd3960cb0dc8197d78a Mon Sep 17 00:00:00 2001 From: David <54660361+NonSwag@users.noreply.github.com> Date: Mon, 30 Dec 2024 11:07:40 +0100 Subject: [PATCH] [ci skip] Clarify loot table behavior when set to null. (#11861) Updated documentation to specify that setting a null loot table resets it to its default behavior. --- paper-api/src/main/java/org/bukkit/loot/Lootable.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/loot/Lootable.java b/paper-api/src/main/java/org/bukkit/loot/Lootable.java index 649dd95903..4fe5696095 100644 --- a/paper-api/src/main/java/org/bukkit/loot/Lootable.java +++ b/paper-api/src/main/java/org/bukkit/loot/Lootable.java @@ -16,7 +16,7 @@ public interface Lootable { /** * Set the loot table for a container or entity. *
- * To remove a loot table use null. + * If the provided loot table is null, the loot table will be reset to its default behavior. * * @param table the Loot Table this {@link org.bukkit.block.Container} or * {@link org.bukkit.entity.Mob} will have. @@ -38,6 +38,8 @@ public interface Lootable { // Paper start /** * Set the loot table and seed for a container or entity at the same time. + *
+ * If the provided loot table is null, the loot table will be reset to its default behavior. * * @param table the Loot Table this {@link org.bukkit.block.Container} or {@link org.bukkit.entity.Mob} will have. * @param seed the seed to used to generate loot. Default is 0. @@ -53,7 +55,8 @@ public interface Lootable { } /** - * Clears the associated Loot Table to this object + * Clears the associated Loot Table to this object, essentially resetting it to default + * @see #setLootTable(LootTable) */ default void clearLootTable() { this.setLootTable(null);