windows compatibility patch

This commit is contained in:
Stachelbeere1248 2023-12-10 09:04:43 +01:00
parent 3321001b22
commit 3c3fca84ea
2 changed files with 3 additions and 3 deletions

View file

@ -3,4 +3,4 @@ org.gradle.jvmargs=-Xmx2g
baseGroup = com.github.stachelbeere1248.zombiesutils
mcVersion = 1.8.9
modid = zombiesutils
version = 1.2.1
version = 1.2.2

View file

@ -18,14 +18,14 @@ public class GameFile extends SplitsFile {
private final GameData data;
public GameFile(String serverNumber, Map map) {
super("zombies" + File.separator + "runs", formattedTime() + "_" + serverNumber + ".times");
super(new File("zombies", "runs"), formattedTime() + "_" + serverNumber + ".seg");
data = new GameData(map);
FileManager.createDataFile(this);
}
private static @NotNull String formattedTime() {
final LocalDateTime dateTime = LocalDateTime.now().truncatedTo(ChronoUnit.MINUTES);
return dateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME);
return dateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME).replace(':','-').replaceFirst("T","_");
}
public void setSegment(int round, short ticks) {