Class PagingPage
java.lang.Object
mc.obliviate.inventory.Gui
com.ultikits.ultitools.abstracts.guis.PagingPage
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
@Deprecated(since="6.2.0",
forRemoval=true)
public abstract class PagingPage
extends mc.obliviate.inventory.Gui
Deprecated, for removal: This API element is subject to removal in a future version.
This abstract class represents a GUI page with pagination.
It extends the Gui class from mc.obliviate.inventory package.
这个抽象类代表了一个带有分页的GUI页面。它继承了mc.obliviate.inventory包中的Gui类。
- Since:
- 6.2.0 deprecated
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final mc.obliviate.inventory.pagination.PaginationManagerDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class mc.obliviate.inventory.Gui
player -
Constructor Summary
ConstructorsConstructorDescriptionPagingPage(@NotNull org.bukkit.entity.Player player, @NotNull String id, String title, int rows) Deprecated, for removal: This API element is subject to removal in a future version.Constructor with player, id, title and number of rows as parameters.PagingPage(@NotNull org.bukkit.entity.Player player, @NotNull String id, String title, org.bukkit.event.inventory.InventoryType inventoryType) Deprecated, for removal: This API element is subject to removal in a future version.Constructor with player, id, title and inventory type as parameters.PagingPage(@NotNull org.bukkit.entity.Player player, @NotNull String id, net.kyori.adventure.text.Component title, int rows) Deprecated, for removal: This API element is subject to removal in a future version.Constructor with player, id, title component and number of rows as parameters.PagingPage(@NotNull org.bukkit.entity.Player player, @NotNull String id, net.kyori.adventure.text.Component title, org.bukkit.event.inventory.InventoryType inventoryType) Deprecated, for removal: This API element is subject to removal in a future version.Constructor with player, id, title component and inventory type as parameters. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidinit()Deprecated, for removal: This API element is subject to removal in a future version.This method initializes the PaginationManager and registers the page slots.voidonOpen(org.bukkit.event.inventory.InventoryOpenEvent event) Deprecated, for removal: This API element is subject to removal in a future version.This method is called when the GUI is opened.abstract List<mc.obliviate.inventory.Icon> Deprecated, for removal: This API element is subject to removal in a future version.This method should be overridden in subclasses to provide the items for the GUI.private voidDeprecated, for removal: This API element is subject to removal in a future version.This method updates the items in the GUI.Methods inherited from class mc.obliviate.inventory.Gui
addItem, addItem, addItem, addItem, addItem, addItem, addItem, addItem, createInventory, createInventory, fillColumn, fillGui, fillGui, fillGui, fillGui, fillRow, getId, getInventory, getItems, getLastSlot, getPlugin, getSize, getTaskList, getTitle, isClosed, onClick, onClose, onDrag, open, runTaskLater, sendSizeUpdate, sendTitleUpdate, setClosed, setInventory, setSize, setTitle, stopAllTasks, stopTask, updateTask
-
Field Details
-
paginationManager
private final mc.obliviate.inventory.pagination.PaginationManager paginationManagerDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
PagingPage
public PagingPage(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String id, String title, int rows) Deprecated, for removal: This API element is subject to removal in a future version.Constructor with player, id, title and number of rows as parameters.构造函数,参数为玩家、id、标题和行数。
- Parameters:
player- The player who will see the GUI. 玩家id- The id of the GUI. GUI的IDtitle- The title of the GUI. GUI的标题rows- The number of rows in the GUI. GUI的行数
-
PagingPage
public PagingPage(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String id, String title, org.bukkit.event.inventory.InventoryType inventoryType) Deprecated, for removal: This API element is subject to removal in a future version.Constructor with player, id, title and inventory type as parameters.构造函数,参数为玩家、id、标题和背包类型。
- Parameters:
player- The player who will see the GUI. 玩家id- The id of the GUI. GUI的IDtitle- The title of the GUI. GUI的标题inventoryType- The type of the inventory. 背包类型
-
PagingPage
public PagingPage(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String id, net.kyori.adventure.text.Component title, int rows) Deprecated, for removal: This API element is subject to removal in a future version.Constructor with player, id, title component and number of rows as parameters.构造函数,参数为玩家、id、标题组件和行数。
- Parameters:
player- The player who will see the GUI. 玩家id- The id of the GUI. GUI的IDtitle- The title of the GUI as a Component. GUI的标题rows- The number of rows in the GUI. GUI的行数
-
PagingPage
public PagingPage(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String id, net.kyori.adventure.text.Component title, org.bukkit.event.inventory.InventoryType inventoryType) Deprecated, for removal: This API element is subject to removal in a future version.Constructor with player, id, title component and inventory type as parameters.构造函数,参数为玩家、id、标题组件和背包类型。
- Parameters:
player- The player who will see the GUI. 玩家id- The id of the GUI. GUI的IDtitle- The title of the GUI as a Component. GUI的标题inventoryType- The type of the inventory. 背包类型
-
-
Method Details
-
init
private void init()Deprecated, for removal: This API element is subject to removal in a future version.This method initializes the PaginationManager and registers the page slots.这个方法初始化了PaginationManager并注册了页面的槽位。
-
onOpen
public void onOpen(org.bukkit.event.inventory.InventoryOpenEvent event) Deprecated, for removal: This API element is subject to removal in a future version.This method is called when the GUI is opened. It updates the items in the GUI.这个方法在GUI被打开时调用。它更新了GUI中的物品。
- Overrides:
onOpenin classmc.obliviate.inventory.Gui- Parameters:
event- The InventoryOpenEvent that triggers this method.触发此方法的InventoryOpenEvent。
-
updateItems
private void updateItems()Deprecated, for removal: This API element is subject to removal in a future version.This method updates the items in the GUI. It clears the current items, sets the new items and updates the pagination.这个方法更新了GUI中的物品。它清除了当前的物品,设置了新的物品并更新了分页。
-
setAllItems
Deprecated, for removal: This API element is subject to removal in a future version.This method should be overridden in subclasses to provide the items for the GUI.此方法应该在子类中被重写以提供GUI的物品。
- Returns:
- A list of Icons that represent the items in the GUI.
代表GUI中物品的Icon列表。
-
BasePaginationPageinstead, which provides better template method pattern and code organization.请使用
BasePaginationPage, 它提供了更好的模板方法模式和代码组织。