kangarko / ChatControl-Red

Issue tracker and documentation for the next generation ChatControl Red, the most advanced chat management plugin.
44 stars 22 forks source link

1.20.2: Unable to parse JavaScript when use msg via ShopGUI+ plugins #2552

Closed Corey-Stowe closed 5 months ago

Corey-Stowe commented 5 months ago

"/version ChatControlRed" - plugin version

10.23.6

Are you using MySQL?

Yes

Are you using BungeeCord?

Yes

Error log (if applicable)

https://paste.gg/p/anonymous/de562aa0b9084d688c64f6cabc241f6a

"/chc debug" output (strongly recommended)

No response

Information about the issue/bug

This issue occurs when a player purchases an item using ShopGUI+. After making a purchase, the command to send a message (/msg) to the player is initiated, but unfortunately, the message does not appear for the player.

image

kangarko commented 5 months ago

Open variables/ping.yml and change Value to

Value: |-

  // Returns the ping of the player who sent a message with this variable
  getPing();

  function getPing() {

    // Try to call player.getPing() method directly if available 
    try {
        return player.getPing();

    // On old Minecraft use the NMS getHandle() and ping field.
    // You can access NMS here directly like this without worrying about imports.
    } catch (exception) {
        return player.getHandle().ping
    }
  }