Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ A curated list of plugins for the [Pelican Panel](https://pelican.dev). Feel fre

## How to install plugins

[Download the repository archive](https://github.com/pelican-dev/plugins/archive/refs/heads/main.zip) and extract the folders of the plugins you want to install to your panels `plugins` folder (`/var/www/pelican/plugins` by default). Finally, open your panel and head to the plugins page and click on "Install".
[Download the repository archive](https://github.com/pelican-dev/plugins/archive/refs/heads/main.zip) and extract the folders of the plugins you want to install to your panels `plugins` folder (`(/var/www/pelican/plugins` by default). Finally, open your panel and head to the plugins page and click on "Install".

## Plugins

- [Announcements](/announcements) - Create panel wide announcements to inform your users
- [Billing](/billing) - Allows users to purchase servers via Stripe
- [Generic OIDC Providers](/generic-oidc-providers) - Create generic OIDC providers for authentication
- [Legal Pages](/legal-pages) - Adds legal pages (Imprint, Privacy Policy, ToS) to the panel
- [MCLogs Uploader](/mclogs-uploader) - Upload console logs to mclo.gs
- [MCLogs Uploader](/mclogs-uploader) - Upload console logs to mclo.gs (add `mclogs-updater` tag to eggs to enable)
- [Minecraft Modrinth](/minecraft-modrinth) - Download Minecraft mods & plugins from Modrinth
- [Player Counter](/player-counter) - Show connected players count for game servers
- [Register](/register) - Enable user self-registration on all panels
Expand All @@ -32,4 +32,4 @@ A curated list of plugins for the [Pelican Panel](https://pelican.dev). Feel fre

## Language Packs

- [Pirate Language](/pirate-language) - Turns yer site's lingo into pirate talk, matey!
- [Pirate Language](/pirate-language) - Turns yer site's lingo into pirate talk, matey!
38 changes: 37 additions & 1 deletion mclogs-uploader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,40 @@ Upload server console logs to mclo.gs for easy sharing and troubleshooting.

- One-click upload of console logs to mclo.gs
- Integrated action button in the server console
- Perfect for (but not limited to) Minecraft server
- **Tag-based visibility**: Show upload button only for specific eggs
- Perfect for (but not limited to) Minecraft servers

## Configuration

### Tag-Based Filtering

The upload button can be configured to only appear for servers using eggs with the `mclogs-updater` tag.

#### How to enable:

1. Navigate to the Egg configuration in your Pelican Panel
2. Add the tag `mclogs-updater` to eggs that support log uploading
3. The upload button will automatically appear only on servers using tagged eggs

**Note:** If no eggs have the `mclogs-updater` tag, the button will be hidden for all servers. This ensures the plugin only appears where it's actually needed.

## Usage

1. Navigate to your server's console page
2. Click the "Upload logs" button (visible only if your egg has the `mclogs-updater` tag)
3. The current console logs will be uploaded to mclo.gs
4. You'll receive a shareable link in a notification

## Requirements

- Pelican Panel
- Server must be online to upload logs
- Egg must have the `mclogs-updater` tag (for tag-based filtering)

## Installation

Install via Pelican Panel's plugin system or manually place in the plugins directory.

## Support

For issues or feature requests, please visit the [GitHub repository](https://github.com/pelican-dev/plugins/tree/main/mclogs-uploader).
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,53 @@ protected function setUp(): void
parent::setUp();

$this->hidden(function () {
$mc_tag = "mclogs-updater";

/** @var Server $server */
$server = Filament::getTenant();

return $server->retrieveStatus()->isOffline();
if ($server->retrieveStatus()->isOffline()) {
return true;
}
$egg = $server->egg;

// check if egg has tag 'mclogs-updater'
if (method_exists($egg, $mc_tag)) {
try {
$hasTag = $egg->tags()->where('name', $mc_tag)->exists();
if ($hasTag) {
return false;
}
} catch (Exception $e) {
}
}
if (isset($egg->tags)) {
$tags = is_string($egg->tags) ? json_decode($egg->tags, true) : $egg->tags;
if (is_array($tags) && in_array($mc_tag, $tags)) {
return false;
}
}
if (isset($egg->meta) && is_array($egg->meta) && isset($egg->meta['tags'])) {
if (in_array($mc_tag, $egg->meta['tags'])) {
return false;
}
}

try {
$eggTags = \DB::table('egg_tag')
->join('tags', 'egg_tag.tag_id', '=', 'tags.id')
->where('egg_tag.egg_id', $egg->id)
->where('tags.name', $mc_tag)
->exists();

if ($eggTags) {
return false;
}
} catch (Exception $e) {

}

return true;
});

$this->label(fn () => trans('mclogs-uploader::upload.upload_logs'));
Expand Down Expand Up @@ -82,4 +125,4 @@ protected function setUp(): void
}
});
}
}
}
Loading