Skip to content

Commit 64eb35c

Browse files
committed
πŸ“˜ Show version in game
1 parent 03f9cec commit 64eb35c

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

β€Žsrc/main/java/com/james090500/Config.javaβ€Ž

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
import lombok.Getter;
44
import lombok.Setter;
55

6+
import java.util.Objects;
7+
68
@Getter
79
@Setter
810
public class Config {
911
private String runDir;
1012
private String name = "BlockGame Client";
11-
private String version = "0.0.1";
13+
private String version = Objects.requireNonNullElse(Main.class.getPackage().getImplementationVersion(), "Dev");
1214

1315
private boolean paused = true;
1416
private long FPS;

β€Žsrc/main/java/com/james090500/client/ClientWindow.javaβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
public class ClientWindow {
1919

20-
private final String title = "BlockGame";
20+
private final String title = "BlockGame " + BlockGame.getInstance().getConfig().getVersion();
2121

2222
@Getter
2323
private int baseWidth = 854;

0 commit comments

Comments
Β (0)