mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-25 18:47:40 +01:00
Item lore cannot be null (but empty)
This commit is contained in:
parent
ea8b8ea41e
commit
d5da334c25
@ -285,9 +285,9 @@ public class ItemStack implements DataContainer, PublicCloneable<ItemStack> {
|
||||
/**
|
||||
* Gets the item lore.
|
||||
*
|
||||
* @return a modifiable list containing the item lore, can be null if not present
|
||||
* @return a modifiable list containing the item lore, can be empty if not present
|
||||
*/
|
||||
@Nullable
|
||||
@NotNull
|
||||
public List<JsonMessage> getLore() {
|
||||
return lore;
|
||||
}
|
||||
@ -295,9 +295,9 @@ public class ItemStack implements DataContainer, PublicCloneable<ItemStack> {
|
||||
/**
|
||||
* Sets the item lore.
|
||||
*
|
||||
* @param lore the item lore, can be null to remove
|
||||
* @param lore the item lore, can be empty to remove
|
||||
*/
|
||||
public void setLore(@Nullable List<JsonMessage> lore) {
|
||||
public void setLore(@NotNull List<JsonMessage> lore) {
|
||||
this.lore = lore;
|
||||
}
|
||||
|
||||
@ -690,7 +690,7 @@ public class ItemStack implements DataContainer, PublicCloneable<ItemStack> {
|
||||
if (material == Material.WRITTEN_BOOK)
|
||||
return new WrittenBookMeta();
|
||||
|
||||
if(material == Material.FIREWORK_STAR)
|
||||
if (material == Material.FIREWORK_STAR)
|
||||
return new FireworkEffectMeta();
|
||||
|
||||
if (material == Material.FIREWORK_ROCKET)
|
||||
|
Loading…
Reference in New Issue
Block a user