public abstract class PagedGUI extends GUI
限定符和类型 | 字段和说明 |
---|---|
protected java.util.List<GUIItem> |
container |
protected int |
page |
cancelOnOuter, cancelOnSelf, cancelOnTarget, emptyItem, flags, inv, items, listener, title, type
限定符和类型 | 方法和说明 |
---|---|
int |
addItem(@NotNull GUIItem i) |
int |
addItem(int index,
@NotNull GUIItem i) |
int |
addItemStack(@NotNull org.bukkit.inventory.ItemStack itemStack) |
int |
getCurrentPage() |
int |
getLastPageNumber() |
int |
getLastPageNumber(int size)
得到最后一页的页码
|
@NotNull java.util.List<GUIItem> |
getPagedContainer() |
void |
goNextPage()
前往下一页
|
void |
goPreviousPage()
前往上一页
|
abstract boolean |
hasNextPage() |
abstract boolean |
hasPreviousPage() |
void |
onPageChange(int pageNum)
当GUI改变页码时执行的代码
|
void |
removeItem(@NotNull GUIItem item)
从GUI中移除一个物品
|
void |
removeItem(int index)
从GUI中移除一个物品
|
int |
setCurrentPage(int page) |
applyToInventory, closeAll, fillEmptySlots, getFlag, getGUIName, getGUIType, getItem, getItems, getOpenedGUI, getOpenedGUIs, getPlugin, hasOpenedGUI, initialize, onClose, onDrag, onUpdate, openGUI, rawClickListener, removeFlag, removeOpenedGUI, setCancelOnOuter, setCancelOnSelf, setCancelOnTarget, setEmptyItem, setFlag, setItem, setItem, setItem, setItemStack, setItemStack, setOpenedGUI, updateTitle, updateView
protected java.util.List<GUIItem> container
protected int page
protected PagedGUI(@NotNull @NotNull GUIType type, @NotNull @NotNull java.lang.String title)
public int setCurrentPage(int page)
public int getCurrentPage()
public int getLastPageNumber()
public int getLastPageNumber(int size)
public int addItem(@NotNull @NotNull GUIItem i)
public int addItem(int index, @NotNull @NotNull GUIItem i)
public int addItemStack(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack)
public void removeItem(@NotNull @NotNull GUIItem item)
item
- 物品public void removeItem(int index)
index
- 物品格子数@NotNull public @NotNull java.util.List<GUIItem> getPagedContainer()
public void onPageChange(int pageNum)
public void goPreviousPage()
public void goNextPage()
public abstract boolean hasPreviousPage()
public abstract boolean hasNextPage()
Copyright © 2024. All rights reserved.