Marriage Master Bukit Event - Discord SRV
XxPoNaGeXx opened this issue ยท 2 comments
Hi, there I'm using discordsrv alerts to announce marriages and divorces.
# Send a divorce message
- Trigger: DivorcedEvent
Channel: global
Embed:
Color: "#bc1e1b"
ImageUrl: ""
Author:
Name: "${#event.getPlayer1()} and ${#event.getPlayer2()} just got divorced"
ImageUrl: "{embedavatarurl}"
Url: ""
Is what I have so far but this returns
Any idea on how to get this to return actual usernames/displaynames?
DiscordSRV] Plugin DiscordSRV v1.25.0 generated an exception while executing task 906556
18.03 21:38:07 [Server] INFO org.springframework.expression.spel.SpelEvaluationException: EL1004E: Method call: Method getPlayer1() cannot be found on type at.pcgamingfreaks.MarriageMaster.Bukkit.API.Events.MarriedEvent
Never used the that plugin, but if I understand there documentation correctly, this should work:
MarriedEvent:
#event.getMarriageData().getPartner1().getName()
and #event.getMarriageData().getPartner2().getName()
DivorcedEvent:
#event.getPlayer1().getName()
and #event.getPlayer2().getName()
Replace getName()
with getDisplayName()
for the display name.