geforkt von Mirrors/Paper
editMeta: tighten contract via docs (#5714)
Dieser Commit ist enthalten in:
Ursprung
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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren