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