Moar, not redy for production

This commit is contained in:
Allink 2022-05-10 15:37:13 +01:00
parent ddb5f9ed43
commit 35a5ffe71c
No known key found for this signature in database
GPG key ID: 77DCA801362E9645
9 changed files with 268 additions and 91 deletions

View file

@ -0,0 +1,30 @@
package dev.plex.nush;
import javax.annotation.Nullable;
public enum NushAction {
MUTE("Mute Player", 0),
CANCEL("Cancel", 1),
SMITE("Smite", 2),
BAN("Ban Player", 3),
ACCEPT("Accept", 4);
public final String humanReadable;
public final int ordinal;
NushAction(String humanReadable, int ordinal) {
this.humanReadable = humanReadable;
this.ordinal = ordinal;
}
@Nullable
public static NushAction fromOrdinal(int ordinal) {
for (NushAction value : NushAction.values()) {
if (value.ordinal == ordinal) {
return value;
}
}
return null;
}
}