MarriageMaster icon indicating copy to clipboard operation
MarriageMaster copied to clipboard

Marriage Master Bukit Event - Discord SRV

Open XxPoNaGeXx opened this issue 4 years ago • 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 image

Any idea on how to get this to return actual usernames/displaynames?

XxPoNaGeXx avatar Mar 18 '22 20:03 XxPoNaGeXx

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

XxPoNaGeXx avatar Mar 18 '22 21:03 XxPoNaGeXx

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.

GeorgH93 avatar Mar 19 '22 10:03 GeorgH93