mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 20:44:08 +00:00
29 lines
692 B
Java
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;
|
|
}
|
|
}
|