Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Add config option for enabling achievements (#1504)
* Add config option for enabling achievements * Disabled achievements by default and added warning about commands being disabled * Update config.yml * Rename achievements-enabled to xbox-achievements-enabled for clarity Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
Dieser Commit ist enthalten in:
Ursprung
0e15aa7441
Commit
a6cc28ee80
@ -81,6 +81,8 @@ public interface GeyserConfiguration {
|
||||
|
||||
boolean isForceResourcePacks();
|
||||
|
||||
boolean isXboxAchievementsEnabled();
|
||||
|
||||
int getCacheImages();
|
||||
|
||||
IMetricsInfo getMetrics();
|
||||
|
@ -107,6 +107,9 @@ public abstract class GeyserJacksonConfiguration implements GeyserConfiguration
|
||||
@JsonProperty("force-resource-packs")
|
||||
private boolean forceResourcePacks = true;
|
||||
|
||||
@JsonProperty("xbox-achievements-enabled")
|
||||
private boolean xboxAchievementsEnabled = false;
|
||||
|
||||
private MetricsInfo metrics = new MetricsInfo();
|
||||
|
||||
@Getter
|
||||
|
@ -634,7 +634,7 @@ public class GeyserSession implements CommandSender {
|
||||
startGamePacket.setLevelGameType(GameType.SURVIVAL);
|
||||
startGamePacket.setDifficulty(1);
|
||||
startGamePacket.setDefaultSpawn(Vector3i.ZERO);
|
||||
startGamePacket.setAchievementsDisabled(true);
|
||||
startGamePacket.setAchievementsDisabled(!connector.getConfig().isXboxAchievementsEnabled());
|
||||
startGamePacket.setCurrentTick(-1);
|
||||
startGamePacket.setEduEditionOffers(0);
|
||||
startGamePacket.setEduFeaturesEnabled(false);
|
||||
@ -645,7 +645,7 @@ public class GeyserSession implements CommandSender {
|
||||
startGamePacket.getGamerules().add(new GameRuleData<>("showcoordinates", true));
|
||||
startGamePacket.setPlatformBroadcastMode(GamePublishSetting.PUBLIC);
|
||||
startGamePacket.setXblBroadcastMode(GamePublishSetting.PUBLIC);
|
||||
startGamePacket.setCommandsEnabled(true);
|
||||
startGamePacket.setCommandsEnabled(!connector.getConfig().isXboxAchievementsEnabled());
|
||||
startGamePacket.setTexturePacksRequired(false);
|
||||
startGamePacket.setBonusChestEnabled(false);
|
||||
startGamePacket.setStartingWithMap(false);
|
||||
|
@ -117,6 +117,11 @@ above-bedrock-nether-building: false
|
||||
# want to download the resource packs
|
||||
force-resource-packs: true
|
||||
|
||||
# Allows Xbox achievements to be unlocked.
|
||||
# This disables certain commands so the Bedrock client can't to "cheat" to get them.
|
||||
# Commands such as /gamemode and /give will not work from Bedrock with this enabled
|
||||
xbox-achievements-enabled: false
|
||||
|
||||
# bStats is a stat tracker that is entirely anonymous and tracks only basic information
|
||||
# about Geyser, such as how many people are online, how many servers are using Geyser,
|
||||
# what OS is being used, etc. You can learn more about bStats here: https://bstats.org/.
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren