We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03cbbe8 commit bcfeb76Copy full SHA for bcfeb76
1 file changed
api/services/info.service.js
@@ -87,14 +87,16 @@ function getPlatform(jarPath = consts.serverDirectory + "/" + consts.serverName)
87
}
88
89
function getVersion(jarPath) {
90
- if (getPlatform(jarPath) == "Fabric") {
91
- console.error("Unable to get version from fabric servers");
92
- return "Unable to fetch version";
93
- }
94
-
+
95
const zip = new AdmZip(jarPath);
96
const entries = zip.getEntries();
97
+ if (getPlatform(jarPath) == "Fabric") {
+ const installEntry = entries.find(entry => entry.entryName === 'install.properties');
+ const text = zip.readAsText(installEntry);
+ return text.split("game-version=")[1];
98
+ }
99
100
const versionEntry = entries.find(e => e.entryName === "version.json");
101
if (versionEntry) {
102
try {
0 commit comments