-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d52257e
commit d37d18e
Showing
8 changed files
with
677 additions
and
321 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
102 changes: 102 additions & 0 deletions
102
pm5/CrashAnnouncer/CrashAnnouncer_v1.0.0.phar.desc.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<div class="markdown-heading"><h1 class="heading-element">Crash Announcer Plugin</h1><a id="user-content-crash-announcer-plugin" class="anchor" aria-label="Permalink: Crash Announcer Plugin" href="#crash-announcer-plugin"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<p><strong>Crash Announcer</strong> is a PocketMine-MP plugin that automatically sends detailed crash reports to a specified Discord channel through a webhook when an error or crash occurs on your server. This helps server administrators quickly identify and resolve issues.</p> | ||
<hr> | ||
<div class="markdown-heading"><h2 class="heading-element">Features</h2><a id="user-content-features" class="anchor" aria-label="Permalink: Features" href="#features"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<ul> | ||
<li> | ||
<strong>Automatic crash detection</strong>: Detects and reports both runtime errors and fatal errors.</li> | ||
<li> | ||
<strong>Detailed crash reports</strong>: Reports include error message, file, line number, and server information.</li> | ||
<li> | ||
<strong>Customizable Discord embed</strong>: You can fully customize the appearance of the embed message sent to your Discord webhook.</li> | ||
<li> | ||
<strong>Lightweight and easy to use</strong>: Minimal setup required, designed for efficient performance.</li> | ||
</ul> | ||
<hr> | ||
<div class="markdown-heading"><h2 class="heading-element">Installation</h2><a id="user-content-installation" class="anchor" aria-label="Permalink: Installation" href="#installation"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<ol> | ||
<li>Download the plugin's <code>.phar</code> file and place it in the <code>plugins</code> folder of your PocketMine-MP server.</li> | ||
<li>Start the server to generate the configuration file.</li> | ||
<li>Open the <code>config.yml</code> file located in the <code>plugins/CrashAnnouncer</code> folder and configure it according to your preferences.</li> | ||
</ol> | ||
<hr> | ||
<div class="markdown-heading"><h2 class="heading-element">Configuration (<code>config.yml</code>)</h2><a id="user-content-configuration-configyml" class="anchor" aria-label="Permalink: Configuration (config.yml)" href="#configuration-configyml"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<div class="highlight highlight-source-yaml"><pre><span class="pl-c"><span class="pl-c">#</span> Discord webhook URL where crash reports will be sent</span> | ||
<span class="pl-ent">webhook-url</span>: <span class="pl-s"><span class="pl-pds">"</span>YOUR_DISCORD_WEBHOOK_URL<span class="pl-pds">"</span></span> | ||
|
||
<span class="pl-c"><span class="pl-c">#</span> Embed message customization</span> | ||
<span class="pl-ent">embed-title</span>: <span class="pl-s"><span class="pl-pds">"</span>Server Crash Report<span class="pl-pds">"</span></span> | ||
<span class="pl-ent">embed-description</span>: <span class="pl-s"><span class="pl-pds">"</span>A crash occurred on your server. Details are provided below.<span class="pl-pds">"</span></span> | ||
<span class="pl-ent">embed-color</span>: <span class="pl-s"><span class="pl-pds">"</span>#FF0000<span class="pl-pds">"</span></span> <span class="pl-c"><span class="pl-c">#</span> Hexadecimal color code for embed</span> | ||
|
||
<span class="pl-c"><span class="pl-c">#</span> Plugin messages</span> | ||
<span class="pl-ent">messages</span>: | ||
<span class="pl-ent">plugin-enabled</span>: <span class="pl-s"><span class="pl-pds">"</span>Crash Announcer enabled.<span class="pl-pds">"</span></span> | ||
<span class="pl-ent">error-webhook</span>: <span class="pl-s"><span class="pl-pds">"</span>Failed to send crash report to the webhook.<span class="pl-pds">"</span></span></pre></div> | ||
<hr> | ||
<div class="markdown-heading"><h2 class="heading-element">How It Works</h2><a id="user-content-how-it-works" class="anchor" aria-label="Permalink: How It Works" href="#how-it-works"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<ol> | ||
<li> | ||
<p><strong>Error Handling</strong><br> | ||
The plugin uses <code>set_error_handler</code> and <code>register_shutdown_function</code> to detect errors and crashes:</p> | ||
<ul> | ||
<li> | ||
<code>handleCrash</code>: Captures non-fatal errors and sends a report.</li> | ||
<li> | ||
<code>handleFatalError</code>: Captures fatal errors and sends a report before the server shuts down.</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<p><strong>Sending Reports</strong><br> | ||
When an error or crash is detected, the plugin sends a detailed report to the configured Discord webhook. The report includes:</p> | ||
<ul> | ||
<li>Error message, file, and line number</li> | ||
<li>Server information (OS, PocketMine version, and number of online players)</li> | ||
<li>Timestamp of the crash</li> | ||
</ul> | ||
</li> | ||
</ol> | ||
<hr> | ||
<div class="markdown-heading"><h2 class="heading-element">Example Crash Report</h2><a id="user-content-example-crash-report" class="anchor" aria-label="Permalink: Example Crash Report" href="#example-crash-report"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<p><strong>Embed Title:</strong><br> | ||
<code>Server Crash Report</code></p> | ||
<p><strong>Embed Description:</strong><br> | ||
<code>A crash occurred on your server. Details are provided below.</code></p> | ||
<p><strong>Fields:</strong></p> | ||
<ul> | ||
<li> | ||
<strong>Error:</strong> | ||
<pre><code>Example error message | ||
</code></pre> | ||
</li> | ||
<li> | ||
<strong>File:</strong><br> | ||
<code>plugins/MyPlugin/Main.php</code> | ||
</li> | ||
<li> | ||
<strong>Line:</strong><br> | ||
<code>42</code> | ||
</li> | ||
<li> | ||
<strong>Server Info:</strong><br> | ||
<code>OS: Linux</code><br> | ||
<code>PM Version: 5.0.0</code><br> | ||
<code>Players Online: 3</code> | ||
</li> | ||
</ul> | ||
<hr> | ||
<div class="markdown-heading"><h2 class="heading-element">Requirements</h2><a id="user-content-requirements" class="anchor" aria-label="Permalink: Requirements" href="#requirements"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<ul> | ||
<li>PocketMine-MP version <strong>5.0.0</strong> or higher</li> | ||
<li>PHP <strong>8.0</strong> or higher</li> | ||
<li>A valid Discord webhook URL</li> | ||
</ul> | ||
<hr> | ||
<div class="markdown-heading"><h2 class="heading-element">License</h2><a id="user-content-license" class="anchor" aria-label="Permalink: License" href="#license"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<p>This plugin is released under the <strong>MIT License</strong>. Feel free to use, modify, and distribute it as long as you include the original license.</p> | ||
<hr> | ||
<div class="markdown-heading"><h2 class="heading-element">Support</h2><a id="user-content-support" class="anchor" aria-label="Permalink: Support" href="#support"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<p>If you encounter any issues or have suggestions, feel free to open an issue or contribute to the plugin’s development.</p> | ||
<hr> | ||
<p><strong>Author:</strong> SoyDavs<br> | ||
<strong>Version:</strong> 1.0.0</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# CrashAnnouncer | ||
<img src="https://raw.githubusercontent.com/SoyDavs/CrashAnnouncer/3525d8148e25040c221422096c87761d27405be6/icon.png" width="128" height="128" /> | ||
|
||
## Announces server crashes to Discord via webhook | ||
```properties | ||
Version: 1.0.0 | ||
API: 5.0.0 | ||
Updated: 07-01-2025 15:02:30 UTC | ||
Repo: https://github.com/SoyDavs/CrashAnnouncer | ||
License: MIT | ||
Categories: General,Admin Tools | ||
Keywords: discord,crash,admin,announce | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<ul dir="auto"> | ||
<li>Code rewrite(fixed 99% of the bugs)</li> | ||
<li>Added 2 new leaderboards(deaths and killstreaks)</li> | ||
<li>Easier API for developers <3</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<div class="markdown-heading"><h1 class="heading-element">Description</h1><a id="user-content-description" class="anchor" aria-label="Permalink: Description" href="#description"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<p>A <a href="https://pmmp.io" rel="nofollow">Pocketmine-MP</a> plugin that adds a KDR managment system, See all the features below!</p> | ||
<p>This plugin also creates a floating text leaderboards that shows off the top kills, deaths and killstreaks on the server as well!</p> | ||
<p>KDR-PE had a huge code rewrite on January 7, 2025</p> | ||
<p>This rewrite fixes 99% of the bugs from v1.0.5 rewrite....</p> | ||
<p><strong>Note:</strong> | ||
Theres a bug where the floatingtext leaderboard shows an empty leaderboard, to fix this just type the command again.</p> | ||
<div class="markdown-heading"><h1 class="heading-element">Features</h1><a id="user-content-features" class="anchor" aria-label="Permalink: Features" href="#features"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<ul> | ||
<li>Kill tracker</li> | ||
<li>Death tracker</li> | ||
<li>Killstreak tracker</li> | ||
<li>KDR system</li> | ||
<li>Topkill system</li> | ||
<li>TopDeath system</li> | ||
<li>TopKillStreak system</li> | ||
<li>See other players kills, deaths, killstreak and KDRS</li> | ||
<li>Scorehud support</li> | ||
<li>CREATE A TOP KILL/DEATH/KILLSTREAK LEADERBOARD(Floating Text).</li> | ||
</ul> | ||
<div class="markdown-heading"><h2 class="heading-element">ScoreHud Tags</h2><a id="user-content-scorehud-tags" class="anchor" aria-label="Permalink: ScoreHud Tags" href="#scorehud-tags"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<ul> | ||
<li>Kills: {kdrpe.kills}</li> | ||
<li>Deaths: {kdrpe.deaths}</li> | ||
<li>KDR: {kdrpe.kdr}</li> | ||
<li>KillStreak: {kdrpe.killstreak}</li> | ||
</ul> | ||
<p>Link to his plugin: <a href="https://github.com/Ifera/ScoreHud">ScoreHud</a></p> | ||
<div class="markdown-heading"><h1 class="heading-element">Permissions/Commands</h1><a id="user-content-permissionscommands" class="anchor" aria-label="Permalink: Permissions/Commands" href="#permissionscommands"><span aria-hidden="true" class="octicon octicon-link"></span></a></div> | ||
<p><strong>KDR Command</strong></p> | ||
<pre><code>Command: /kdr | ||
|
||
Aliases: NONE | ||
|
||
Permission: kdrpe.kdr | ||
|
||
defualt: true | ||
</code></pre> | ||
<p><strong>SeeKDR Command</strong></p> | ||
<pre><code>Command: /seekdr | ||
|
||
Aliases: NONE | ||
|
||
Permission: kdrpe.seekdr | ||
|
||
default: true | ||
</code></pre> | ||
<p><strong>TopKill Command</strong></p> | ||
<pre><code>Command: /topkill | ||
|
||
Aliases: /topkills, /tk | ||
|
||
Permission: kdrpe.topkill | ||
|
||
default: true | ||
</code></pre> | ||
<p><strong>TopDeath Command</strong></p> | ||
<pre><code>Command: /topdeath | ||
|
||
Aliases: /topdeaths, /td | ||
|
||
Permission: kdrpe.topdeath | ||
|
||
default: true | ||
</code></pre> | ||
<p><strong>TopKillStreak Command</strong></p> | ||
<pre><code>Command: /topkillstreak | ||
|
||
Aliases: /topkillstreaks, /tks | ||
|
||
Permission: kdrpe.topkillstreak | ||
|
||
default: true | ||
</code></pre> | ||
<p><strong>KillLeaderboard Command</strong></p> | ||
<pre><code>Command: /killleaderboard | ||
|
||
Aliases: /killlb, /klb | ||
|
||
Permission: kdrpe.killleaderboard | ||
|
||
default: op | ||
</code></pre> | ||
<p><strong>DeathLeaderboard Command</strong></p> | ||
<pre><code>Command: /deathleaderboard | ||
|
||
Aliases: /deathlb, /dlb | ||
|
||
Permission: kdrpe.deathleaderboard | ||
|
||
default: op | ||
</code></pre> | ||
<p><strong>KillStreakLeaderboard Command</strong></p> | ||
<pre><code>Command: /killstreakleaderboard | ||
|
||
Aliases: /killstreaklb, /kslb | ||
|
||
Permission: kdrpe.killstreakleaderboard | ||
|
||
default: op | ||
</code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters