diff options
author | Jake Potrebic <[email protected]> | 2024-04-26 17:00:26 -0700 |
---|---|---|
committer | Jake Potrebic <[email protected]> | 2024-04-26 17:00:40 -0700 |
commit | ba8512a0d8c7874b21fc2219674f0bd5efd6e135 (patch) | |
tree | e06c06e7b94946fee5d88390568a7ea31152a405 /patches | |
parent | c38f96b0e57ad28f444dad8d1c4d2f1fb6ea19cb (diff) | |
download | Paper-ba8512a0d8c7874b21fc2219674f0bd5efd6e135.tar.gz Paper-ba8512a0d8c7874b21fc2219674f0bd5efd6e135.zip |
fix javadocs for SpawnerEntry$Equipment API
Diffstat (limited to 'patches')
-rw-r--r-- | patches/api/0471-Fix-SpawnerEntry-Equipment-API.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/patches/api/0471-Fix-SpawnerEntry-Equipment-API.patch b/patches/api/0471-Fix-SpawnerEntry-Equipment-API.patch new file mode 100644 index 0000000000..0a16b34cd5 --- /dev/null +++ b/patches/api/0471-Fix-SpawnerEntry-Equipment-API.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Fri, 26 Apr 2024 17:00:00 -0700 +Subject: [PATCH] Fix SpawnerEntry$Equipment API + + +diff --git a/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java b/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java +index 02b3471774ff1fd4ad15c2f04064fd485ef8f3e5..0fc5f04b8bb475e8afce61c6187a390cd36c3d9f 100644 +--- a/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java ++++ b/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java +@@ -121,28 +121,29 @@ public class SpawnerEntry { + private final Map<EquipmentSlot, Float> dropChances; + + public Equipment(@NotNull LootTable equipmentLootTable, @NotNull Map<EquipmentSlot, Float> dropChances) { ++ Preconditions.checkArgument(equipmentLootTable != null, "table cannot be null"); // Paper + this.equipmentLootTable = equipmentLootTable; + this.dropChances = dropChances; + } + + /** +- * Set the loot table for the entity. ++ * Set the loot table for the spawned entity's equipment slots. + * <br> +- * To remove a loot table use null. Do not use {@link LootTables#EMPTY} +- * to clear a LootTable. ++ * To remove a loot table use {@link LootTables#EMPTY}. + * + * @param table this {@link org.bukkit.entity.Mob} will have. + */ + public void setEquipmentLootTable(@NotNull LootTable table) { ++ Preconditions.checkArgument(table != null, "table cannot be null"); // Paper + this.equipmentLootTable = table; + } + + /** +- * Gets the loot table for the entity. ++ * Gets the loot table for the spawned entity's equipment. + * <br> + * +- * If an entity does not have a loot table, this will return null, NOT +- * an empty loot table. ++ * If an entity does not have a loot table, this will return an ++ * empty loot table. + * + * @return the loot table for this entity. + */ |