public final class BasicSmartInventory extends Object implements SmartInventory
SmartInventory.DEFAULT_OPENERS, LISTENERS| Constructor and Description |
|---|
BasicSmartInventory(@NotNull org.bukkit.plugin.Plugin plugin) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearContents()
clears all contents.
|
void |
clearContentsByInventory()
clears all contents by inventory
|
void |
clearLastPages()
clears all the latest opened pages.
|
void |
clearPages()
clears all pages.
|
void |
clearTask()
clears all tasks.
|
@NotNull Map<org.bukkit.entity.Player,InventoryContents> |
getContents()
obtains all
InventoryContents. |
@NotNull Optional<InventoryContents> |
getContents(@NotNull org.bukkit.entity.Player player)
obtains
InventoryContents of the given player. |
@NotNull Map<org.bukkit.inventory.Inventory,InventoryContents> |
getContentsByInventory()
obtains a map that contains
Inventory and InventoryContents as key and value. |
@NotNull Optional<InventoryContents> |
getContentsByInventory(@NotNull org.bukkit.inventory.Inventory inventory)
obtains
InventoryContents from the given inventory. |
@NotNull Optional<Page> |
getLastPage(@NotNull org.bukkit.entity.Player player)
obtains the latest opened page of the given player.
|
@NotNull Map<org.bukkit.entity.Player,Page> |
getLastPages()
obtains the latest opened pages.
|
@NotNull Collection<InventoryOpener> |
getOpeners()
obtains inventory openers.
|
@NotNull Optional<Page> |
getPage(@NotNull org.bukkit.entity.Player player)
obtains the page that seeing by the given player.
|
@NotNull Map<org.bukkit.entity.Player,Page> |
getPages()
obtains all opened
Page. |
@NotNull org.bukkit.plugin.Plugin |
getPlugin()
obtains the plugin.
|
@NotNull Optional<org.bukkit.scheduler.BukkitRunnable> |
getTask(@NotNull org.bukkit.entity.Player player)
obtains the given player's task.
|
void |
registerOpeners(InventoryOpener... openers)
registers the given inventory openers.
|
void |
removeContent(@NotNull org.bukkit.entity.Player player)
removes the given player's
InventoryContents. |
void |
removeContentByInventory(@NotNull org.bukkit.inventory.Inventory inventory)
removes the given inventory's
InventoryContents. |
void |
removeLastPage(@NotNull org.bukkit.entity.Player player)
removes the given player's latest opened
Page. |
void |
removePage(@NotNull org.bukkit.entity.Player player)
removes the given player's
Page. |
void |
removeTask(@NotNull org.bukkit.entity.Player player)
removes given player of the ticking task.
|
void |
setContents(@NotNull org.bukkit.entity.Player player,
@NotNull InventoryContents contest)
sets the given player of the contents to the given contents.
|
void |
setContentsByInventory(@NotNull org.bukkit.inventory.Inventory inventory,
@NotNull InventoryContents contest)
sets the given inventory of the contents to the given contents.
|
void |
setPage(@NotNull org.bukkit.entity.Player player,
@NotNull Page page)
sets the given player of the page to the given page.
|
void |
setTask(@NotNull org.bukkit.entity.Player player,
@NotNull org.bukkit.scheduler.BukkitRunnable task)
sets the given player of the ticking task to the given task.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearLastPages, clearPages, findOpener, getOpenedPlayers, init, notifyUpdate, notifyUpdateForAll, notifyUpdateForAllById, stopTick, tickpublic BasicSmartInventory(@NotNull
@NotNull org.bukkit.plugin.Plugin plugin)
@NotNull public @NotNull org.bukkit.plugin.Plugin getPlugin()
SmartInventorygetPlugin in interface SmartInventory@NotNull public @NotNull Collection<InventoryOpener> getOpeners()
SmartInventorygetOpeners in interface SmartInventory@NotNull public @NotNull Map<org.bukkit.entity.Player,Page> getLastPages()
SmartInventorygetLastPages in interface SmartInventory@NotNull public @NotNull Map<org.bukkit.entity.Player,Page> getPages()
SmartInventoryPage.getPages in interface SmartInventory@NotNull public @NotNull Map<org.bukkit.entity.Player,InventoryContents> getContents()
SmartInventoryInventoryContents.getContents in interface SmartInventory@NotNull public @NotNull Map<org.bukkit.inventory.Inventory,InventoryContents> getContentsByInventory()
SmartInventoryInventory and InventoryContents as key and value.getContentsByInventory in interface SmartInventory@NotNull public @NotNull Optional<Page> getPage(@NotNull @NotNull org.bukkit.entity.Player player)
SmartInventorygetPage in interface SmartInventoryplayer - the player to obtain.Page instance.@NotNull public @NotNull Optional<Page> getLastPage(@NotNull @NotNull org.bukkit.entity.Player player)
SmartInventorygetLastPage in interface SmartInventoryplayer - the player to obtain.Page instance.@NotNull public @NotNull Optional<InventoryContents> getContents(@NotNull @NotNull org.bukkit.entity.Player player)
SmartInventoryInventoryContents of the given player.getContents in interface SmartInventoryplayer - the player to obtain.InventoryContents instance.@NotNull public @NotNull Optional<InventoryContents> getContentsByInventory(@NotNull @NotNull org.bukkit.inventory.Inventory inventory)
SmartInventoryInventoryContents from the given inventory.getContentsByInventory in interface SmartInventoryinventory - the inventory to obtain.InventoryContents instance.@NotNull public @NotNull Optional<org.bukkit.scheduler.BukkitRunnable> getTask(@NotNull @NotNull org.bukkit.entity.Player player)
SmartInventorygetTask in interface SmartInventoryplayer - the player to obtain.BukkitRunnable instance.public void setPage(@NotNull
@NotNull org.bukkit.entity.Player player,
@NotNull
@NotNull Page page)
SmartInventorysetPage in interface SmartInventoryplayer - the player to set.page - the page to set.public void setContents(@NotNull
@NotNull org.bukkit.entity.Player player,
@NotNull
@NotNull InventoryContents contest)
SmartInventorysetContents in interface SmartInventoryplayer - the player to set.contest - the contest to set.public void setContentsByInventory(@NotNull
@NotNull org.bukkit.inventory.Inventory inventory,
@NotNull
@NotNull InventoryContents contest)
SmartInventorysetContentsByInventory in interface SmartInventoryinventory - the inventory to set.contest - the contest to set.public void setTask(@NotNull
@NotNull org.bukkit.entity.Player player,
@NotNull
@NotNull org.bukkit.scheduler.BukkitRunnable task)
SmartInventorysetTask in interface SmartInventoryplayer - the player to set.task - the task to set.public void removePage(@NotNull
@NotNull org.bukkit.entity.Player player)
SmartInventoryPage.removePage in interface SmartInventoryplayer - the player to remove.public void removeLastPage(@NotNull
@NotNull org.bukkit.entity.Player player)
SmartInventoryPage.removeLastPage in interface SmartInventoryplayer - the player to remove.public void removeContent(@NotNull
@NotNull org.bukkit.entity.Player player)
SmartInventoryInventoryContents.removeContent in interface SmartInventoryplayer - the player to remove.public void removeContentByInventory(@NotNull
@NotNull org.bukkit.inventory.Inventory inventory)
SmartInventoryInventoryContents.removeContentByInventory in interface SmartInventoryinventory - the inventory to remove.public void removeTask(@NotNull
@NotNull org.bukkit.entity.Player player)
SmartInventoryremoveTask in interface SmartInventoryplayer - the player to set.public void clearPages()
SmartInventoryclearPages in interface SmartInventorypublic void clearLastPages()
SmartInventoryclearLastPages in interface SmartInventorypublic void clearContents()
SmartInventoryclearContents in interface SmartInventorypublic void clearContentsByInventory()
SmartInventoryclearContentsByInventory in interface SmartInventorypublic void clearTask()
SmartInventoryclearTask in interface SmartInventorypublic void registerOpeners(@NotNull
InventoryOpener... openers)
SmartInventoryregisterOpeners in interface SmartInventoryopeners - the openers to register.Copyright © 2021. All rights reserved.