| Constructor and Description |
|---|
BasicIcon(@NotNull org.bukkit.inventory.ItemStack item)
ctor.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends IconEvent> |
accept(T event)
accepts the upcoming event for all of the handles.
|
@NotNull org.bukkit.inventory.ItemStack |
calculateItem(@NotNull InventoryContents contents)
calculates and returns the item of the icon.
|
@NotNull Icon |
canSee(@NotNull Predicate<InventoryContents> predicate)
sets the canSee value of the icon to the given predicate.
|
@NotNull Icon |
canUse(@NotNull Predicate<InventoryContents> predicate)
sets the canUse value of the icon to the given predicate.
|
@NotNull Icon |
fallback(@NotNull org.bukkit.inventory.ItemStack fallback)
sets the fallback item of the icon to the given item.
|
@NotNull org.bukkit.inventory.ItemStack |
getItem()
obtains the icon's
ItemStack. |
<T extends IconEvent> |
handle(@NotNull Handle<T> handle)
adds the given handle into the icon's handle list.
|
@NotNull Icon |
handles(@NotNull Collection<Handle<? extends IconEvent>> handles)
adds all the given handles into the icon's handle list.
|
@NotNull Icon |
item(@NotNull org.bukkit.inventory.ItemStack item)
sets the item of the icon to the given item.
|
public BasicIcon(@NotNull
@NotNull org.bukkit.inventory.ItemStack item)
item - the item.@NotNull public @NotNull org.bukkit.inventory.ItemStack getItem()
IconItemStack.@NotNull
public @NotNull org.bukkit.inventory.ItemStack calculateItem(@NotNull
@NotNull InventoryContents contents)
IconcanSee with the given contents, and if it returns true,
returns Icon.getItem() else, returns the fallback.calculateItem in interface Iconcontents - the contents to calculate.public <T extends IconEvent> void accept(@NotNull T event)
Icon@NotNull public <T extends IconEvent> @NotNull Icon handle(@NotNull @NotNull Handle<T> handle)
Icon@NotNull public @NotNull Icon handles(@NotNull @NotNull Collection<Handle<? extends IconEvent>> handles)
Icon@NotNull public @NotNull Icon canSee(@NotNull @NotNull Predicate<InventoryContents> predicate)
Icon@NotNull public @NotNull Icon canUse(@NotNull @NotNull Predicate<InventoryContents> predicate)
Icon@NotNull public @NotNull Icon fallback(@NotNull @NotNull org.bukkit.inventory.ItemStack fallback)
IconCopyright © 2021. All rights reserved.