forked from SteamWar/SteamWar
Fix WorldIdentifier
This commit is contained in:
@@ -27,8 +27,7 @@ import net.minecraft.resources.ResourceKey;
|
|||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.util.Locale;
|
||||||
import java.util.HexFormat;
|
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
public class WorldIdentifier {
|
public class WorldIdentifier {
|
||||||
@@ -40,7 +39,7 @@ public class WorldIdentifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setArena(String map) {
|
public static void setArena(String map) {
|
||||||
set("arena/" + Core.getVersion() + "/" + HexFormat.of().formatHex(map.getBytes(StandardCharsets.UTF_8)));
|
set("arena/" + Core.getVersion() + "/" + map.toLowerCase(Locale.ROOT).replaceAll("[^a-z0-9._-]", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
public WorldIdentifier() {
|
public WorldIdentifier() {
|
||||||
|
|||||||
Reference in New Issue
Block a user