Skip to content

Commit

Permalink
Improved TranslatableItem#apply documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
anjoismysign committed Mar 8, 2024
1 parent 3a51162 commit 6d08fd4
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ default ItemStack getClone() {

/**
* Applies the TranslatableItem to an existing ItemStack without overwriting its data.
* It only applies the displayname and lore!
* This doesn't translate an already valid TranslatableItem instance!
* It only applies the display name and lore.
* It also sets the locale and reference in the ItemStack's NBT, making it a valid TranslatableItem instance.
* This method is useful in cases of which another plugin manages ItemStacks.
*
* @param itemStack The ItemStack to apply the TranslatableItem to.
* @param locale The locale to apply.
Expand Down Expand Up @@ -237,7 +240,10 @@ default void apply(@NotNull ItemStack itemStack, @NotNull String locale) {

/**
* Applies the TranslatableItem to an existing ItemStack without overwriting its data.
* It only applies the displayname and lore!
* This doesn't translate an already valid TranslatableItem instance!
* It only applies the display name and lore.
* It also sets the locale and reference in the ItemStack's NBT, making it a valid TranslatableItem instance.
* This method is useful in cases of which another plugin manages ItemStacks.
*
* @param itemStack The ItemStack to apply the TranslatableItem to.
* @param player The player to apply the TranslatableItem to.
Expand Down

0 comments on commit 6d08fd4

Please sign in to comment.