mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 21:38:44 +00:00
More Core Class Conversion
This commit is contained in:
1 parent
43a52ad407
commit
89f81f96bc
51 files changed
+744
-189
No files matched your search
@@ -1,40 +0,0 @@
|
||||
package noppes.npcs.constants;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public enum EnumAuctionSort {
|
||||
NEWEST("auction.sort.newest"),
|
||||
ENDING_SOON("auction.sort.endingSoon"),
|
||||
PRICE_LOW("auction.sort.priceLow"),
|
||||
PRICE_HIGH("auction.sort.priceHigh"),
|
||||
MOST_BIDS("auction.sort.mostBids");
|
||||
|
||||
private final String langKey;
|
||||
|
||||
EnumAuctionSort(String langKey) {
|
||||
this.langKey = langKey;
|
||||
}
|
||||
|
||||
public String getLangKey() {
|
||||
return langKey;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return StatCollector.translateToLocal(langKey);
|
||||
}
|
||||
|
||||
public static String[] getDisplayNames() {
|
||||
String[] names = new String[values().length];
|
||||
for (int i = 0; i < values().length; i++) {
|
||||
names[i] = values()[i].getDisplayName();
|
||||
}
|
||||
return names;
|
||||
}
|
||||
|
||||
public static EnumAuctionSort fromOrdinal(int ordinal) {
|
||||
if (ordinal >= 0 && ordinal < values().length) {
|
||||
return values()[ordinal];
|
||||
}
|
||||
return NEWEST;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user