mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 20:07:41 +01:00
editMeta: tighten contract via docs (#5714)
This commit is contained in:
parent
51b2370434
commit
027b85caf3
@ -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 New Issue
Block a user