We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8ce9d4 commit e4ec7f7Copy full SHA for e4ec7f7
src/main/java/in/techpro424/itemblacklist/util/Formatting.java
@@ -12,10 +12,11 @@ public static String formatArrayList(ArrayList<String> arrayList) {
12
}
13
14
public static String formatDimension(String dimensionName) {
15
- String[] array = dimensionName.split("minecraft:");
16
- String dimensionName2 = array[1];
17
- if(!dimensionName2.contains("the_")) return dimensionName2;
18
- String[] array2 = dimensionName2.split("the_");
19
- return array2[1];
+ return switch (dimensionName) {
+ case "minecraft:overworld" -> "overworld";
+ case "minecraft:the_nether" -> "nether";
+ case "minecraft:the_end" -> "end";
+ default -> "global";
20
+ };
21
22
0 commit comments