Package net.kyori.adventure.text.event
Class HoverEvent.ShowItem
java.lang.Object
net.kyori.adventure.text.event.HoverEvent.ShowItem
- All Implemented Interfaces:
net.kyori.examination.Examinable
- Enclosing class:
- HoverEvent<V>
public static final class HoverEvent.ShowItem extends Object implements net.kyori.examination.Examinable
The value of a
show_item
hover event.- Since:
- 4.0.0
-
Method Summary
Modifier and Type Method Description @org.checkerframework.checker.index.qual.NonNegative int
count()
Gets the count.@NonNull HoverEvent.ShowItem
count(@org.checkerframework.checker.index.qual.NonNegative int count)
Sets the count.boolean
equals(@Nullable Object other)
@NonNull Stream<? extends net.kyori.examination.ExaminableProperty>
examinableProperties()
int
hashCode()
@NonNull net.kyori.adventure.key.Key
item()
Gets the item.@NonNull HoverEvent.ShowItem
item(@NonNull net.kyori.adventure.key.Key item)
Sets the item.@Nullable BinaryTagHolder
nbt()
Gets the nbt.@NonNull HoverEvent.ShowItem
nbt(@Nullable BinaryTagHolder nbt)
Sets the nbt.static @NonNull HoverEvent.ShowItem
of(@NonNull net.kyori.adventure.key.Keyed item, @org.checkerframework.checker.index.qual.NonNegative int count)
Creates.static @NonNull HoverEvent.ShowItem
of(@NonNull net.kyori.adventure.key.Keyed item, @org.checkerframework.checker.index.qual.NonNegative int count, @Nullable BinaryTagHolder nbt)
Creates.static @NonNull HoverEvent.ShowItem
of(@NonNull net.kyori.adventure.key.Key item, @org.checkerframework.checker.index.qual.NonNegative int count)
Creates.static @NonNull HoverEvent.ShowItem
of(@NonNull net.kyori.adventure.key.Key item, @org.checkerframework.checker.index.qual.NonNegative int count, @Nullable BinaryTagHolder nbt)
Creates.String
toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.kyori.examination.Examinable
examinableName, examine
-
Method Details
-
of
public static @NonNull HoverEvent.ShowItem of(@NonNull net.kyori.adventure.key.Key item, @org.checkerframework.checker.index.qual.NonNegative int count)Creates.- Parameters:
item
- the itemcount
- the count- Returns:
- a
ShowItem
- Since:
- 4.0.0
-
of
public static @NonNull HoverEvent.ShowItem of(@NonNull net.kyori.adventure.key.Keyed item, @org.checkerframework.checker.index.qual.NonNegative int count)Creates.- Parameters:
item
- the itemcount
- the count- Returns:
- a
ShowItem
- Since:
- 4.6.0
-
of
public static @NonNull HoverEvent.ShowItem of(@NonNull net.kyori.adventure.key.Key item, @org.checkerframework.checker.index.qual.NonNegative int count, @Nullable BinaryTagHolder nbt)Creates.- Parameters:
item
- the itemcount
- the countnbt
- the nbt- Returns:
- a
ShowItem
- Since:
- 4.0.0
-
of
public static @NonNull HoverEvent.ShowItem of(@NonNull net.kyori.adventure.key.Keyed item, @org.checkerframework.checker.index.qual.NonNegative int count, @Nullable BinaryTagHolder nbt)Creates.- Parameters:
item
- the itemcount
- the countnbt
- the nbt- Returns:
- a
ShowItem
- Since:
- 4.6.0
-
item
public @NonNull net.kyori.adventure.key.Key item()Gets the item.- Returns:
- the item
- Since:
- 4.0.0
-
item
Sets the item.- Parameters:
item
- the item- Returns:
- a
ShowItem
- Since:
- 4.0.0
-
count
public @org.checkerframework.checker.index.qual.NonNegative int count()Gets the count.- Returns:
- the count
- Since:
- 4.0.0
-
count
public @NonNull HoverEvent.ShowItem count(@org.checkerframework.checker.index.qual.NonNegative int count)Sets the count.- Parameters:
count
- the count- Returns:
- a
ShowItem
- Since:
- 4.0.0
-
nbt
Gets the nbt.- Returns:
- the nbt
- Since:
- 4.0.0
-
nbt
Sets the nbt.- Parameters:
nbt
- the nbt- Returns:
- a
ShowItem
- Since:
- 4.0.0
-
equals
-
hashCode
public int hashCode() -
examinableProperties
- Specified by:
examinableProperties
in interfacenet.kyori.examination.Examinable
-
toString
-