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:
JOO200
2023-03-20 09:18:06 +01:00
parent 82f1c94258
commit c54215c1b2
3 changed files with 10 additions and 10 deletions

View File

@@ -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());