make ShowMeYourName patch safer

This commit is contained in:
Vendicated 2025-07-21 12:13:13 +02:00
parent 113a1f4b86
commit 4ab084c0ac
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -50,7 +50,8 @@ export default definePlugin({
{
find: '="SYSTEM_TAG"',
replacement: {
match: /(?<=onContextMenu:\i,children:)\i\?/,
// The field is named "userName", but as this is unusual casing, the regex also matches username, in case they change it
match: /(?<=onContextMenu:\i,children:)\i\?(?=.{0,100}?user[Nn]ame:)/,
replace: "$self.renderUsername(arguments[0]),_oldChildren:$&"
}
},