mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
editMeta: tighten contract via docs (#5714)
This commit is contained in:
parent
51b2370434
commit
027b85caf3
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start
|
||||
+ /**
|
||||
+ * Edits the {@link ItemMeta} of this stack.
|
||||
+ * <p>
|
||||
+ * The {@link java.util.function.Consumer} must only interact
|
||||
+ * with this stack's {@link ItemMeta} through the provided {@link ItemMeta} instance.
|
||||
+ * Calling this method or any other meta-related method of the {@link ItemStack} class
|
||||
+ * (such as {@link #getItemMeta()}, {@link #addItemFlags(ItemFlag...)}, {@link #lore()}, etc.)
|
||||
+ * from inside the consumer is disallowed and will produce undefined results or exceptions.
|
||||
+ * </p>
|
||||
+ *
|
||||
+ * @param consumer the meta consumer
|
||||
+ * @return {@code true} if the edit was successful, {@code false} otherwise
|
||||
|
|
Loading…
Reference in a new issue