From ab18a979b80512d4d69255557ce96f709a0680d2 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 17 Jan 2022 10:09:22 +1100 Subject: [PATCH] SPIGOT-6901: Make Random Nullable in LootTable By: Doc --- paper-api/src/main/java/org/bukkit/loot/LootTable.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/loot/LootTable.java b/paper-api/src/main/java/org/bukkit/loot/LootTable.java index 73aa119b6e..b7529fc746 100644 --- a/paper-api/src/main/java/org/bukkit/loot/LootTable.java +++ b/paper-api/src/main/java/org/bukkit/loot/LootTable.java @@ -6,6 +6,7 @@ import org.bukkit.Keyed; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * LootTables are technical files that represent what items should be in @@ -25,7 +26,7 @@ public interface LootTable extends Keyed { * @return a list of ItemStacks */ @NotNull - Collection populateLoot(@NotNull Random random, @NotNull LootContext context); + Collection populateLoot(@Nullable Random random, @NotNull LootContext context); /** * Attempt to fill an inventory with this LootTable's loot. @@ -34,5 +35,5 @@ public interface LootTable extends Keyed { * @param random the random instance to use to generate loot * @param context context within to populate loot */ - void fillInventory(@NotNull Inventory inventory, @NotNull Random random, @NotNull LootContext context); + void fillInventory(@NotNull Inventory inventory, @Nullable Random random, @NotNull LootContext context); }