From 62861837b6bb63b3e61509f1f9cbfdee2fb8eee1 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sun, 8 May 2022 22:47:33 +0300 Subject: [PATCH 1/2] @everyone, @here and all @ fix(port of johnymuffin's one) --- src/PocketMinecraftServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 2ddff9fc..1d182b22 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -716,7 +716,7 @@ class PocketMinecraftServer{ $url = $this->extraprops->get("discord-webhook-url"); $name = $this->extraprops->get("discord-bot-name"); $headers = [ 'Content-Type: application/json; charset=utf-8' ]; - $POST = [ 'username' => $name, 'content' => $msg]; + $POST = [ 'username' => $name, 'content' => str_replace("@"," ",$msg)]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, true); From 19e9a1eabb1f80f8d91bb27a75427826f28ddae8 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sun, 8 May 2022 23:47:02 +0300 Subject: [PATCH 2/2] Death messages i guess --- src/API/PlayerAPI.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index f3754041..62d8e9d2 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -110,6 +110,7 @@ class PlayerAPI{ } } $this->server->api->chat->broadcast($data["player"]->username . $message); + $this->server->send2Discord($data["player"]->username . $message); return true; break; }