File transfer
This commit is contained in:
210
config/addon-commands/vanilla.json
Normal file
210
config/addon-commands/vanilla.json
Normal file
@@ -0,0 +1,210 @@
|
||||
[
|
||||
{
|
||||
"name": "say",
|
||||
"aliases": [],
|
||||
"description": "Broadcasts a message to all players",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "message", "type": "string", "required": true, "suggestions": [] }
|
||||
],
|
||||
"examples": ["say Hello everyone!"],
|
||||
"permission": "minecraft.command.say"
|
||||
},
|
||||
{
|
||||
"name": "ban",
|
||||
"aliases": [],
|
||||
"description": "Bans a player from the server",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": true,
|
||||
"dangerReason": "Permanently bans a player",
|
||||
"args": [
|
||||
{ "name": "target", "type": "player", "required": true, "suggestions": [] },
|
||||
{ "name": "reason", "type": "string", "required": false, "suggestions": [] }
|
||||
],
|
||||
"examples": ["ban Steve Cheating", "ban Notch Griefing"],
|
||||
"permission": "minecraft.command.ban"
|
||||
},
|
||||
{
|
||||
"name": "op",
|
||||
"aliases": [],
|
||||
"description": "Gives operator status to a player",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": true,
|
||||
"dangerReason": "Grants full server operator access",
|
||||
"args": [
|
||||
{ "name": "target", "type": "player", "required": true, "suggestions": [] }
|
||||
],
|
||||
"examples": ["op Steve"],
|
||||
"permission": "minecraft.command.op"
|
||||
},
|
||||
{
|
||||
"name": "deop",
|
||||
"aliases": [],
|
||||
"description": "Revokes operator status from a player",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "target", "type": "player", "required": true, "suggestions": [] }
|
||||
],
|
||||
"examples": ["deop Steve"],
|
||||
"permission": "minecraft.command.deop"
|
||||
},
|
||||
{
|
||||
"name": "gamemode",
|
||||
"aliases": ["gm"],
|
||||
"description": "Changes a player's game mode",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "mode", "type": "string", "required": true, "suggestions": ["survival", "creative", "adventure", "spectator", "0", "1", "2", "3"] },
|
||||
{ "name": "target", "type": "player", "required": false, "suggestions": [] }
|
||||
],
|
||||
"examples": ["gamemode creative", "gamemode survival Steve"],
|
||||
"permission": "minecraft.command.gamemode"
|
||||
},
|
||||
{
|
||||
"name": "give",
|
||||
"aliases": [],
|
||||
"description": "Gives an item to a player",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "target", "type": "player", "required": true, "suggestions": [] },
|
||||
{ "name": "item", "type": "string", "required": true, "suggestions": ["minecraft:diamond", "minecraft:iron_sword", "minecraft:netherite_pickaxe"] },
|
||||
{ "name": "count", "type": "number", "required": false, "suggestions": ["1", "16", "64"] }
|
||||
],
|
||||
"examples": ["give Steve minecraft:diamond 64"],
|
||||
"permission": "minecraft.command.give"
|
||||
},
|
||||
{
|
||||
"name": "tp",
|
||||
"aliases": ["teleport"],
|
||||
"description": "Teleports entities",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "target", "type": "player", "required": true, "suggestions": [] },
|
||||
{ "name": "destination", "type": "player", "required": false, "suggestions": [] }
|
||||
],
|
||||
"examples": ["tp Steve Alex", "tp Steve 100 64 200"],
|
||||
"permission": "minecraft.command.tp"
|
||||
},
|
||||
{
|
||||
"name": "whitelist",
|
||||
"aliases": [],
|
||||
"description": "Manages the server whitelist",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": true,
|
||||
"dangerReason": "whitelist off allows anyone to join",
|
||||
"args": [
|
||||
{ "name": "action", "type": "string", "required": true, "suggestions": ["on", "off", "add", "remove", "list", "reload"] },
|
||||
{ "name": "player", "type": "player", "required": false, "suggestions": [] }
|
||||
],
|
||||
"examples": ["whitelist add Steve", "whitelist on"],
|
||||
"permission": "minecraft.command.whitelist"
|
||||
},
|
||||
{
|
||||
"name": "stop",
|
||||
"aliases": [],
|
||||
"description": "Stops the server",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": true,
|
||||
"dangerReason": "Stops the server immediately",
|
||||
"args": [],
|
||||
"examples": ["stop"],
|
||||
"permission": "minecraft.command.stop"
|
||||
},
|
||||
{
|
||||
"name": "kill",
|
||||
"aliases": [],
|
||||
"description": "Kills entities",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": true,
|
||||
"dangerReason": "kill @e kills all entities; kill @a kills all players",
|
||||
"args": [
|
||||
{ "name": "target", "type": "string", "required": true, "suggestions": ["@e", "@a", "@r", "@p", "@s"] }
|
||||
],
|
||||
"examples": ["kill @e[type=zombie]", "kill Steve"],
|
||||
"permission": "minecraft.command.kill"
|
||||
},
|
||||
{
|
||||
"name": "time",
|
||||
"aliases": [],
|
||||
"description": "Queries or changes the world time",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "action", "type": "string", "required": true, "suggestions": ["set", "add", "query"] },
|
||||
{ "name": "value", "type": "string", "required": false, "suggestions": ["day", "night", "noon", "midnight", "0", "6000", "12000", "18000"] }
|
||||
],
|
||||
"examples": ["time set day", "time set 6000"],
|
||||
"permission": "minecraft.command.time"
|
||||
},
|
||||
{
|
||||
"name": "weather",
|
||||
"aliases": [],
|
||||
"description": "Sets the weather",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "type", "type": "string", "required": true, "suggestions": ["clear", "rain", "thunder"] },
|
||||
{ "name": "duration", "type": "number", "required": false, "suggestions": ["60", "300", "600"] }
|
||||
],
|
||||
"examples": ["weather clear", "weather thunder 300"],
|
||||
"permission": "minecraft.command.weather"
|
||||
},
|
||||
{
|
||||
"name": "difficulty",
|
||||
"aliases": [],
|
||||
"description": "Sets the difficulty level",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "difficulty", "type": "string", "required": true, "suggestions": ["peaceful", "easy", "normal", "hard"] }
|
||||
],
|
||||
"examples": ["difficulty hard"],
|
||||
"permission": "minecraft.command.difficulty"
|
||||
},
|
||||
{
|
||||
"name": "effect",
|
||||
"aliases": [],
|
||||
"description": "Gives or removes status effects",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "action", "type": "string", "required": true, "suggestions": ["give", "clear"] },
|
||||
{ "name": "target", "type": "player", "required": true, "suggestions": [] },
|
||||
{ "name": "effect", "type": "string", "required": false, "suggestions": ["speed", "jump_boost", "regeneration", "strength", "night_vision", "fire_resistance", "water_breathing", "invisibility"] }
|
||||
],
|
||||
"examples": ["effect give Steve speed 30 2"],
|
||||
"permission": "minecraft.command.effect"
|
||||
},
|
||||
{
|
||||
"name": "enchant",
|
||||
"aliases": [],
|
||||
"description": "Enchants a player's held item",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "target", "type": "player", "required": true, "suggestions": [] },
|
||||
{ "name": "enchantment", "type": "string", "required": true, "suggestions": ["sharpness", "protection", "efficiency", "unbreaking", "fortune", "silk_touch", "mending"] },
|
||||
{ "name": "level", "type": "number", "required": false, "suggestions": ["1", "2", "3", "4", "5"] }
|
||||
],
|
||||
"examples": ["enchant Steve sharpness 5"],
|
||||
"permission": "minecraft.command.enchant"
|
||||
},
|
||||
{
|
||||
"name": "gamerule",
|
||||
"aliases": [],
|
||||
"description": "Sets or queries a game rule",
|
||||
"plugin": "vanilla",
|
||||
"dangerous": false,
|
||||
"args": [
|
||||
{ "name": "rule", "type": "string", "required": true, "suggestions": ["doDaylightCycle", "doFireTick", "doMobSpawning", "keepInventory", "pvp", "doWeatherCycle", "commandBlockOutput", "naturalRegeneration"] },
|
||||
{ "name": "value", "type": "string", "required": false, "suggestions": ["true", "false"] }
|
||||
],
|
||||
"examples": ["gamerule keepInventory true"],
|
||||
"permission": "minecraft.command.gamerule"
|
||||
}
|
||||
]
|
||||
192
config/advanced-admin.php
Normal file
192
config/advanced-admin.php
Normal file
@@ -0,0 +1,192 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Pterodactyl Advanced Admin Addons — Configuration
|
||||
*
|
||||
* @author Ball Studios <https://git.balls.studio>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Addon Meta
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'version' => '1.0.0',
|
||||
'author' => 'Ball Studios',
|
||||
'repo' => 'https://git.balls.studio/BallStudios/pterodactyl_addon',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Network Traffic Dashboard
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'network' => [
|
||||
// Enable/disable the module entirely
|
||||
'enabled' => env('ADDON_NETWORK_ENABLED', true),
|
||||
|
||||
// How often (seconds) to collect Docker stats metrics
|
||||
'collection_interval_seconds' => env('ADDON_NETWORK_INTERVAL', 10),
|
||||
|
||||
// Enable iptables/nftables port-level collection (requires host access)
|
||||
'iptables_enabled' => env('ADDON_NETWORK_IPTABLES', false),
|
||||
|
||||
// Retention periods (days) per resolution tier
|
||||
'retention' => [
|
||||
'raw' => env('ADDON_NETWORK_RETENTION_RAW', 1), // 1 day raw
|
||||
'5m' => env('ADDON_NETWORK_RETENTION_5M', 7), // 7 days 5-min
|
||||
'1h' => env('ADDON_NETWORK_RETENTION_1H', 30), // 30 days hourly
|
||||
'1d' => env('ADDON_NETWORK_RETENTION_1D', 365), // 365 days daily
|
||||
],
|
||||
|
||||
// Max live-poll rate (requests per minute per user per server)
|
||||
'rate_limit_per_minute' => env('ADDON_NETWORK_RATE_LIMIT', 12),
|
||||
|
||||
// Wings REST stats endpoint path (relative to node FQDN:port)
|
||||
'wings_stats_path' => '/api/servers/{uuid}/resources',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Role-Based Server Permissions
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'roles' => [
|
||||
'enabled' => env('ADDON_ROLES_ENABLED', true),
|
||||
|
||||
// Maximum roles per server (0 = unlimited)
|
||||
'max_roles_per_server' => env('ADDON_ROLES_MAX', 0),
|
||||
|
||||
// Warn before deleting a role that has active assignments
|
||||
'warn_on_delete_in_use' => true,
|
||||
|
||||
// Known dangerous permissions to flag in UI
|
||||
'dangerous_permissions' => [
|
||||
'file.delete',
|
||||
'allocation.*',
|
||||
'startup.*',
|
||||
'database.*',
|
||||
'backup.delete',
|
||||
'user.update',
|
||||
'control.console',
|
||||
],
|
||||
|
||||
// Rate limit for role write operations (per minute per admin)
|
||||
'write_rate_limit' => env('ADDON_ROLES_WRITE_RATE_LIMIT', 30),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File Revision History
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'revisions' => [
|
||||
'enabled' => env('ADDON_REVISIONS_ENABLED', true),
|
||||
|
||||
// Where to store revision files (relative to storage/app/)
|
||||
'storage_path' => env('ADDON_REVISIONS_PATH', 'addons/revisions'),
|
||||
|
||||
// Max file size to track (bytes). Files larger are skipped.
|
||||
'max_file_size' => env('ADDON_REVISIONS_MAX_FILE_SIZE', 10 * 1024 * 1024), // 10 MB
|
||||
|
||||
// Max revisions kept per file
|
||||
'max_revisions_per_file' => env('ADDON_REVISIONS_MAX_PER_FILE', 50),
|
||||
|
||||
// Max total storage per server (bytes)
|
||||
'max_storage_per_server' => env('ADDON_REVISIONS_MAX_STORAGE', 500 * 1024 * 1024), // 500 MB
|
||||
|
||||
// Revision retention in days (0 = keep forever up to max_revisions_per_file)
|
||||
'retention_days' => env('ADDON_REVISIONS_RETENTION_DAYS', 90),
|
||||
|
||||
// Glob patterns to EXCLUDE from tracking (never store these)
|
||||
'excluded_patterns' => [
|
||||
'.env',
|
||||
'*.env',
|
||||
'*.key',
|
||||
'*.pem',
|
||||
'*.p12',
|
||||
'*.pfx',
|
||||
'*.crt',
|
||||
'*.cer',
|
||||
'*.jks',
|
||||
'secrets.yml',
|
||||
'secrets.yaml',
|
||||
'*secret*',
|
||||
'*password*',
|
||||
'*token*',
|
||||
'*.sql',
|
||||
'*.sql.gz',
|
||||
'*.bak',
|
||||
'*.backup',
|
||||
'*.dump',
|
||||
'*.zip',
|
||||
'*.tar',
|
||||
'*.tar.gz',
|
||||
'*.tar.bz2',
|
||||
'*.7z',
|
||||
'*.rar',
|
||||
],
|
||||
|
||||
// Use xdiff PHP extension for delta storage if available
|
||||
'prefer_delta_storage' => env('ADDON_REVISIONS_DELTA', true),
|
||||
|
||||
// Rate limit for restore operations (per minute per user)
|
||||
'restore_rate_limit' => env('ADDON_REVISIONS_RESTORE_RATE_LIMIT', 10),
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Command Autocomplete
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'console' => [
|
||||
'enabled' => env('ADDON_CONSOLE_ENABLED', true),
|
||||
|
||||
// Path to bundled command definition JSON files
|
||||
'definitions_path' => base_path('config/addon-commands'),
|
||||
|
||||
// Debounce (ms) applied on frontend — informational only
|
||||
'frontend_debounce_ms' => 150,
|
||||
|
||||
// Rate limit for autocomplete endpoint (per minute per user per server)
|
||||
'autocomplete_rate_limit' => env('ADDON_CONSOLE_RATE_LIMIT', 60),
|
||||
|
||||
// Stale player cache expiry (minutes)
|
||||
'player_cache_ttl_minutes' => env('ADDON_CONSOLE_PLAYER_TTL', 30),
|
||||
|
||||
// Max suggestions returned per query
|
||||
'max_suggestions' => env('ADDON_CONSOLE_MAX_SUGGESTIONS', 10),
|
||||
|
||||
// Console output patterns for join/leave detection per software type
|
||||
'patterns' => [
|
||||
'join' => [
|
||||
'paper' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/',
|
||||
'spigot' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/',
|
||||
'purpur' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/',
|
||||
'fabric' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/',
|
||||
'forge' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) joined the game/',
|
||||
'velocity' => '/\[[\d:]+\] \[INFO\]: (\w[\w\d_]{0,15}) \[.+\] has connected/',
|
||||
'bungeecord' => '/\[[\d:]+\] \[INFO\]: (\w[\w\d_]{0,15}) \[.+\] connected/',
|
||||
],
|
||||
'leave' => [
|
||||
'paper' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/',
|
||||
'spigot' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/',
|
||||
'purpur' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/',
|
||||
'fabric' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/',
|
||||
'forge' => '/\[[\d:]+\] \[Server thread\/INFO\]: (\w+) left the game/',
|
||||
'velocity' => '/\[[\d:]+\] \[INFO\]: (\w[\w\d_]{0,15}) \[.+\] has disconnected/',
|
||||
'bungeecord' => '/\[[\d:]+\] \[INFO\]: (\w[\w\d_]{0,15}) \[.+\] disconnected/',
|
||||
],
|
||||
],
|
||||
|
||||
// Commands that trigger a danger warning in the UI
|
||||
'dangerous_commands' => [
|
||||
'stop', 'restart', 'ban', 'ban-ip', 'pardon', 'pardon-ip',
|
||||
'op', 'deop', 'whitelist off', 'save-off', 'kill @e', 'kill @a',
|
||||
'forceload', 'execute', 'function',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
Reference in New Issue
Block a user