Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Change version in query to use a more informative string (#1635)
* Change version in query to use a more informative string * Fix removal of string * Cleaner implementation of version * Fix build * Make more explicit what we're replacing Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
Dieser Commit ist enthalten in:
Ursprung
2a44874458
Commit
91cdda95db
@ -230,8 +230,12 @@
|
||||
</includes>
|
||||
<replacements>
|
||||
<replacement>
|
||||
<token>VERSION = ".*"</token>
|
||||
<value>VERSION = "${project.version} (git-${git.branch}-${git.commit.id.abbrev})"</value>
|
||||
<token>String VERSION = ".*"</token>
|
||||
<value>String VERSION = "${project.version} (" + GIT_VERSION + ")"</value>
|
||||
</replacement>
|
||||
<replacement>
|
||||
<token>String GIT_VERSION = ".*"</token>
|
||||
<value>String GIT_VERSION = "git-${git.branch}-${git.commit.id.abbrev}"</value>
|
||||
</replacement>
|
||||
</replacements>
|
||||
</configuration>
|
||||
@ -249,8 +253,12 @@
|
||||
</includes>
|
||||
<replacements>
|
||||
<replacement>
|
||||
<token>VERSION = ".*"</token>
|
||||
<value>VERSION = "DEV"</value>
|
||||
<token>String VERSION = ".*"</token>
|
||||
<value>String VERSION = "DEV"</value>
|
||||
</replacement>
|
||||
<replacement>
|
||||
<token>String GIT_VERSION = ".*"</token>
|
||||
<value>String GIT_VERSION = "DEV"</value>
|
||||
</replacement>
|
||||
</replacements>
|
||||
</configuration>
|
||||
|
@ -86,6 +86,7 @@ public class GeyserConnector {
|
||||
.enable(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES);
|
||||
|
||||
public static final String NAME = "Geyser";
|
||||
public static final String GIT_VERSION = "DEV"; // A fallback for running in IDEs
|
||||
public static final String VERSION = "DEV"; // A fallback for running in IDEs
|
||||
|
||||
private static final String IP_REGEX = "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b";
|
||||
|
@ -174,7 +174,7 @@ public class QueryPacketHandler {
|
||||
gameData.put("hostname", motd);
|
||||
gameData.put("gametype", "SMP");
|
||||
gameData.put("game_id", "MINECRAFT");
|
||||
gameData.put("version", BedrockProtocol.DEFAULT_BEDROCK_CODEC.getMinecraftVersion());
|
||||
gameData.put("version", GeyserConnector.NAME + " (" + GeyserConnector.GIT_VERSION + ") " + BedrockProtocol.DEFAULT_BEDROCK_CODEC.getMinecraftVersion());
|
||||
gameData.put("plugins", "");
|
||||
gameData.put("map", map);
|
||||
gameData.put("numplayers", currentPlayerCount);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren