mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
adventure: make calls with generic component lists more usable (#9008)
This should allow the usage of ItemStack#lore and other methods with a List<TextComponent>
This commit is contained in:
@@ -139,7 +139,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param lore the lore that will be set
|
||||
+ */
|
||||
+ public void lore(@Nullable List<net.kyori.adventure.text.Component> lore) {
|
||||
+ public void lore(@Nullable List<? extends net.kyori.adventure.text.Component> lore) {
|
||||
+ ItemMeta itemMeta = getItemMeta();
|
||||
+ if (itemMeta == null) {
|
||||
+ throw new IllegalStateException("Cannot set lore on " + getType());
|
||||
|
Reference in New Issue
Block a user