Skip to content

window.title type changed in 1.21.8 #3774

@jobpaardekooper

Description

@jobpaardekooper
  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: 4.33.0
  • server: vanilla/spigot/paper #.#.#
  • node: v25.0.0

I open a chest GUI on a server (/afk menu on DonutSMP). When I have my bot version set to z1.20, the window.title is a string and I can check the name, call .includes on it, etc. Now when I change the bot version to 1.21.8, it's no longer a string but an object with a type and value:

const bot = mineflayer.createBot({
    ...
    version: "1.20",
})

if (window.title.includes("ᴀꜰᴋ ᴀʀᴇᴀѕ")) {
    console.log("Works!")
}

// Now

const bot = mineflayer.createBot({
    ...
    version: "1.21.8",
})

console.log(JSON.stringify(window.title)) // {"type":"string","value":"ᴀꜰᴋ ᴀʀᴇᴀѕ"}

if (window.title.includes("ᴀꜰᴋ ᴀʀᴇᴀѕ")) {
    // ERROR: window.title.includes is not a function
}

Seems like it should be a string?

I am willing to contribute a fix if someone can confirm that this is a bug and the type and behavior should remain consistent between these versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stage1just created by someone new to the project, we don't know yet if it deserves an implementation / a fpossible bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions