Closed coralpapa closed 2 years ago
@coralpapa can you give the entire example in which it isn't working
This is what i am currently using:
"title": "Chat message detection from ${detectedEvent.player.name}",
"url": "https://namemc.com/profile/${detectedEvent.player.getUUID()}",
"color": "16601379",
"timestamp": "${timestamp}",
but link shows up
https://namemc.com/profile/$%7BdetectedEvent.player.getUUID()%7D
Hey @coralpapa
It just seems the expression is wrong.
It should be ${detectedEvent.player.uniqueId}
ah, sorry i thought .getUUID() was the method for the player object, seems it was .getUniqueId() console did throw any error so I figured it was just decoding it for url purposes. sorry about the run around
No problem. There is a small warning message shown if the expression is invalid. But it's easily missed:
[13:54:44] [Server thread/WARN]: [StaffPlusPlusDiscord] Invalid expression: [detectedEvent.player.getUUID()]
I am customizing the templates provided and I want to use an event variable in the url but when i trigger the event the variable goes from:
${detectedEvent.player.getUUID()}
to
%24%7BdetectedEvent.player.getUUID()%7D
Think it would be really handy to be able to do uuid or name of player there to point to either your own site to their pofile or a site like namemc.com