diff --git a/api/src/main/java/net/azisaba/loreeditor/api/event/ItemEvent.java b/api/src/main/java/net/azisaba/loreeditor/api/event/ItemEvent.java
index b5ad71f..26671e4 100644
--- a/api/src/main/java/net/azisaba/loreeditor/api/event/ItemEvent.java
+++ b/api/src/main/java/net/azisaba/loreeditor/api/event/ItemEvent.java
@@ -12,6 +12,9 @@
import java.util.Collections;
import java.util.List;
+/**
+ * Fired when an item is being displayed in the inventory.
+ */
public final class ItemEvent {
private final Player player;
private final ItemStack bukkitItem;
@@ -24,22 +27,42 @@ public ItemEvent(@NotNull Player player, @NotNull ItemStack bukkitItem, @NotNull
this.itemTag = itemTag;
}
+ /**
+ * Get the player who is viewing the item
+ * @return the viewer
+ */
public @NotNull Player getPlayer() {
return player;
}
+ /**
+ * Returns the item as a Bukkit ItemStack. Modifications to this item will NOT be reflected in the actual item.
+ * @return the bukkit item
+ */
public @NotNull ItemStack getBukkitItem() {
return bukkitItem;
}
+ /**
+ * Returns the item tag of the item. Modifications to this tag will NOT be reflected in the actual item.
+ * @return the item tag
+ */
public @NotNull CompoundTag getItemTag() {
return itemTag;
}
+ /**
+ * Add a lore to the item. This will be displayed in the result item.
+ * @param component the lore to add
+ */
public void addLore(@NotNull Component component) {
components.add(component);
}
+ /**
+ * Returns the list of lore components to be added to the item.
+ * @return the list of lore components
+ */
@Contract(pure = true)
public @NotNull @UnmodifiableView List getComponents() {
return Collections.unmodifiableList(components);