Files
CustomNPC-Plus/src/main/java/noppes/npcs/constants/EnumAuctionPage.java
T
2026-02-18 05:13:51 -05:00

29 lines
692 B
Java

package noppes.npcs.constants;
/**
* Enum for auction GUI page navigation.
* Maps page indices to GUI types for packet-based navigation.
*/
public enum EnumAuctionPage {
LISTINGS(EnumGuiType.PlayerAuction),
SELL(EnumGuiType.PlayerAuctionSell),
TRADES(EnumGuiType.PlayerAuctionTrades);
private final EnumGuiType guiType;
EnumAuctionPage(EnumGuiType guiType) {
this.guiType = guiType;
}
public EnumGuiType getGuiType() {
return guiType;
}
public static EnumAuctionPage fromOrdinal(int ordinal) {
if (ordinal >= 0 && ordinal < values().length) {
return values()[ordinal];
}
return LISTINGS;
}
}