Add MinecraftVersion#toStringAnd() and #toStringOr()
This commit is contained in:
parent
861a41f6e0
commit
574ef6e4d0
@ -141,9 +141,17 @@ public enum MinecraftVersion {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return toStringAnd();
|
||||
}
|
||||
|
||||
public String toStringAnd() {
|
||||
return StringUtil.joinGrammatically(", ", " et ", versionDisplay);
|
||||
}
|
||||
|
||||
public String toStringOr() {
|
||||
return StringUtil.joinGrammatically(", ", " ou ", versionDisplay);
|
||||
}
|
||||
|
||||
public static MinecraftVersion getVersion(int v) {
|
||||
for (MinecraftVersion mcV : values())
|
||||
if (mcV.id == v) return mcV;
|
||||
|
Loading…
Reference in New Issue
Block a user