Add a config option for toggling showing coordinates (#1645)

This commit is contained in:
Camotoy 2020-12-10 11:13:36 -05:00 committed by GitHub
parent 91cdda95db
commit 87c52ad524
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 1 deletions

View file

@ -71,6 +71,8 @@ public interface GeyserConfiguration {
boolean isShowCooldown(); boolean isShowCooldown();
boolean isShowCoordinates();
String getDefaultLocale(); String getDefaultLocale();
Path getFloodgateKeyPath(); Path getFloodgateKeyPath();

View file

@ -89,6 +89,9 @@ public abstract class GeyserJacksonConfiguration implements GeyserConfiguration
@JsonProperty("show-cooldown") @JsonProperty("show-cooldown")
private boolean showCooldown = true; private boolean showCooldown = true;
@JsonProperty("show-coordinates")
private boolean showCoordinates = true;
@JsonProperty("allow-third-party-ears") @JsonProperty("allow-third-party-ears")
private boolean allowThirdPartyEars = false; private boolean allowThirdPartyEars = false;

View file

@ -673,7 +673,7 @@ public class GeyserSession implements CommandSender {
startGamePacket.setLightningLevel(0); startGamePacket.setLightningLevel(0);
startGamePacket.setMultiplayerGame(true); startGamePacket.setMultiplayerGame(true);
startGamePacket.setBroadcastingToLan(true); startGamePacket.setBroadcastingToLan(true);
startGamePacket.getGamerules().add(new GameRuleData<>("showcoordinates", true)); startGamePacket.getGamerules().add(new GameRuleData<>("showcoordinates", connector.getConfig().isShowCoordinates()));
startGamePacket.setPlatformBroadcastMode(GamePublishSetting.PUBLIC); startGamePacket.setPlatformBroadcastMode(GamePublishSetting.PUBLIC);
startGamePacket.setXblBroadcastMode(GamePublishSetting.PUBLIC); startGamePacket.setXblBroadcastMode(GamePublishSetting.PUBLIC);
startGamePacket.setCommandsEnabled(!connector.getConfig().isXboxAchievementsEnabled()); startGamePacket.setCommandsEnabled(!connector.getConfig().isXboxAchievementsEnabled());

View file

@ -90,6 +90,9 @@ allow-third-party-ears: false
# Allow a fake cooldown indicator to be sent. Bedrock players do not see a cooldown as they still use 1.8 combat # Allow a fake cooldown indicator to be sent. Bedrock players do not see a cooldown as they still use 1.8 combat
show-cooldown: true show-cooldown: true
# Controls if coordinates are shown to players.
show-coordinates: true
# The default locale if we dont have the one the client requested. Uncomment to not use the default system language. # The default locale if we dont have the one the client requested. Uncomment to not use the default system language.
# default-locale: en_us # default-locale: en_us