Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Allow commands with xbox achievements enabled (#4894)
* Allow commands with xbox achievements enabled * Don't enable by default * Add null check to paramData * Update comment
Dieser Commit ist enthalten in:
Ursprung
ca0f3775a2
Commit
13dfc7c173
@ -169,8 +169,8 @@ public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommands
|
||||
return;
|
||||
}
|
||||
|
||||
// The command flags, not sure what these do apart from break things
|
||||
Set<CommandData.Flag> flags = Set.of();
|
||||
// The command flags, set to NOT_CHEAT so known commands can be used while achievements are enabled.
|
||||
Set<CommandData.Flag> flags = Set.of(CommandData.Flag.NOT_CHEAT);
|
||||
|
||||
// Loop through all the found commands
|
||||
for (Map.Entry<BedrockCommandInfo, Set<String>> entry : commands.entrySet()) {
|
||||
@ -449,7 +449,7 @@ public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommands
|
||||
type = (CommandParam) mappedType;
|
||||
// Bedrock throws a fit if an optional message comes after a string or target
|
||||
// Example vanilla commands: ban-ip, ban, and kick
|
||||
if (optional && type == CommandParam.MESSAGE && (paramData.getType() == CommandParam.STRING || paramData.getType() == CommandParam.TARGET)) {
|
||||
if (optional && type == CommandParam.MESSAGE && paramData != null && (paramData.getType() == CommandParam.STRING || paramData.getType() == CommandParam.TARGET)) {
|
||||
optional = false;
|
||||
}
|
||||
}
|
||||
|
@ -168,7 +168,6 @@ above-bedrock-nether-building: false
|
||||
force-resource-packs: true
|
||||
|
||||
# Allows Xbox achievements to be unlocked.
|
||||
# THIS DISABLES ALL COMMANDS FROM SUCCESSFULLY RUNNING FOR BEDROCK IN-GAME, as otherwise Bedrock thinks you are cheating.
|
||||
xbox-achievements-enabled: false
|
||||
|
||||
# Whether player IP addresses will be logged by the server.
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren