From ce1edb42ac5c85528d1cdc9c2f4038af9535a7ca Mon Sep 17 00:00:00 2001 From: mainrs <5113257+mainrs@users.noreply.github.com> Date: Sun, 15 Sep 2024 13:41:29 +0200 Subject: [PATCH] docs: clarify ILabel return conditions --- .../java/me/towdium/jecalculation/data/label/ILabel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/towdium/jecalculation/data/label/ILabel.java b/src/main/java/me/towdium/jecalculation/data/label/ILabel.java index a2620a06..85852083 100644 --- a/src/main/java/me/towdium/jecalculation/data/label/ILabel.java +++ b/src/main/java/me/towdium/jecalculation/data/label/ILabel.java @@ -265,7 +265,10 @@ public enum Priority { * Converts an {@code ItemStack} to its corresponding {@link ILabel} implementation. * * @param item The {@code ItemStack} to convert. - * @return The corresponding {@link ILabel} implementation, or {@link ILabel.LEmpty} if none could be found. + * @return A {@link LItemStack} if the passed argument is an item stack, a {@link LFluidStack} if the past + * item is a fluid stack or an item stack containing a fluid. If the item is neither, returns an + * instance of {@link LPlaceholder}. If the argument is {@code null}, returns an instance of + * {@link ILabel.LEmpty}. */ public static ILabel from(@Nullable Object item) { if (item == null) {