mirror of
https://github.com/barkeser2002/pterodactyl-addons.git
synced 2026-09-25 07:59:56 +03:00
270 lines
10 KiB
Plaintext
270 lines
10 KiB
Plaintext
Hey thanks for your purchase.
|
|
|
|
First add the pterodactyl eslint configuration to your pterodactyl
|
|
|
|
cd /var/www/pterodactyl
|
|
wget https://raw.githubusercontent.com/pterodactyl/panel/develop/.eslintignore
|
|
wget https://raw.githubusercontent.com/pterodactyl/panel/develop/.eslintrc.yml
|
|
|
|
After you need to upload the content of panelfiles/fr or panelfiles/en (It depends on the desired language) folder
|
|
|
|
Now go to change the panel files
|
|
|
|
|
|
1 - In /app/Transformers/Api/Client/ServerTransformer.php bellow "'node' => $server->node->name," add :
|
|
|
|
'nest_id' => $server->nest_id,
|
|
For panel above 1.9 add also this under "'name' => $server->name,":
|
|
|
|
'egg_id' => $server->egg_id,
|
|
2.0 - In resources/scripts/api/server/getServer.ts under "node: string;" add :
|
|
|
|
nestId: number;
|
|
For panel above 1.9 add also this under "node: string;":
|
|
|
|
eggid: number;
|
|
|
|
2.1 - In same file under "node: data.node," add :
|
|
|
|
nestId: data.nest_id,
|
|
|
|
For panel above 1.9 add also this under "status: data.status,":
|
|
|
|
eggid: data.egg_id,
|
|
|
|
3 - IF YOU HAVE A PANEL ON 1.8 VERSION OR ABOVE In routes/api-client.php above "Route::group(['prefix' => '/startup'], function () {" add :
|
|
|
|
Route::group(['prefix' => '/mods'], function () {
|
|
Route::get('/curse', [Client\Servers\ModsController::class, 'curse']);
|
|
Route::get('/versions', [Client\Servers\ModsController::class, 'versions']);
|
|
Route::get('/description', [Client\Servers\ModsController::class, 'description']);
|
|
Route::get('/mcversions', [Client\Servers\ModsController::class, 'mcversions']);
|
|
Route::post('/install', [Client\Servers\ModsController::class, 'install']);
|
|
|
|
});
|
|
|
|
ELSE In routes/api-client.php under "Route::group(['prefix' => '/startup'], function () {" add :
|
|
|
|
Route::group(['prefix' => '/mods'], function () {
|
|
Route::get('/curse', 'Servers\ModsController@curse');
|
|
Route::get('/versions', 'Servers\ModsController@versions');
|
|
Route::get('/description', 'Servers\ModsController@description');
|
|
Route::get('/mcversions', 'Servers\ModsController@mcversions');
|
|
Route::post('/install', 'Servers\ModsController@install');
|
|
|
|
});
|
|
4 - IF YOU HAVE A PANEL ON 1.8 VERSION OR ABOVE In routes/admin.php at the end of file add :
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Bagou License Center Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Endpoint: /admin/bagoucenter
|
|
|
|
|
*/
|
|
Route::group(['prefix' => 'bagoucenter'], function () {
|
|
Route::get('/', [Admin\Bagou\BagouCenterController::class, 'index'])->name('admin.bagoucenter');
|
|
Route::get('/license/', [Admin\Bagou\BagouLicenseController::class, 'index'])->name('admin.bagoucenter.license');
|
|
Route::get('/license/{addon}', [Admin\Bagou\BagouLicenseController::class, 'license'])->name('admin.bagoucenter.license.addon');
|
|
|
|
Route::get('/versions/', [Admin\Bagou\BagouVersionsController::class, 'index'])->name('admin.bagoucenter.versions');
|
|
|
|
Route::get('/settings', [Admin\Bagou\BagouSettingsController::class, 'index'])->name('admin.bagoucenter.settings');
|
|
Route::get('/settings/{addon}', [Admin\Bagou\BagouSettingsController::class, 'settings'])->name('admin.bagoucenter.settings.addon');
|
|
|
|
Route::get('/support/', [Admin\Bagou\BagouCenterController::class, 'settings'])->name('admin.bagoucenter.support');
|
|
|
|
Route::post('/license/{addon}', [Admin\Bagou\BagouLicenseController::class, 'setlicense']);
|
|
|
|
Route::post('/versions', [Admin\Bagou\BagouVersionsController::class, 'refresh']);
|
|
|
|
Route::delete('/license/{addon}', [Admin\Bagou\BagouLicenseController::class, 'removelicense']);
|
|
|
|
});
|
|
|
|
ELSE In routes/admin.php at the end of file add :
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Bagou License Center Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Endpoint: /admin/bagoucenter
|
|
|
|
|
*/
|
|
Route::group(['prefix' => 'bagoucenter'], function () {
|
|
Route::get('/', 'Bagou\BagouCenterController@index')->name('admin.bagoucenter');
|
|
Route::get('/license/', 'Bagou\BagouLicenseController@index')->name('admin.bagoucenter.license');
|
|
Route::get('/license/{addon}', 'Bagou\BagouLicenseController@license')->name('admin.bagoucenter.license.addon');
|
|
|
|
Route::get('/versions/', 'Bagou\BagouVersionsController@index')->name('admin.bagoucenter.versions');
|
|
|
|
Route::get('/settings', 'Bagou\BagouSettingsController@index')->name('admin.bagoucenter.settings');
|
|
Route::get('/settings/{addon}', 'Bagou\BagouSettingsController@settings')->name('admin.bagoucenter.settings.addon');
|
|
|
|
Route::get('/support/', 'Bagou\BagouCenterController@settings')->name('admin.bagoucenter.support');
|
|
|
|
Route::post('/license/{addon}', 'Bagou\BagouLicenseController@setlicense');
|
|
|
|
Route::post('/versions', 'Bagou\BagouVersionsController@refresh');
|
|
|
|
Route::delete('/license/{addon}', 'Bagou\BagouLicenseController@removelicense');
|
|
|
|
});
|
|
|
|
5 - In resources/views/layouts/admin.blade.php above "<li class="header">MANAGEMENT</li>" add :
|
|
|
|
<li class="{{ ! starts_with(Route::currentRouteName(), 'admin.bagoucenter') ?: 'active' }}">
|
|
<a href="{{ route('admin.bagoucenter')}}">
|
|
<i class="fa fa-globe"></i> <span>Bagou Center</span>
|
|
</a>
|
|
</li>
|
|
|
|
FOR PANEL UNDER 1.9 VERSION (from step 6.0 to step 6.3)
|
|
6.0 - In resources/scripts/routers/ServerRouter.tsx under all import line add :
|
|
|
|
import McModsContainer from '@/components/server/mcmods/McModsContainer';
|
|
|
|
|
|
6.1 - In same file under :
|
|
|
|
"<Can action={'backup.*'}>
|
|
<NavLink to={`${match.url}/backups`}>Backups</NavLink>
|
|
</Can>"
|
|
|
|
add :
|
|
{nestId === 1 &&
|
|
<Can action={'mcmods.*'}>
|
|
<NavLink to={`${match.url}/mcmods`}>Minecraft Mods</NavLink>
|
|
</Can>
|
|
}
|
|
|
|
6.2 - In same file under "const clearServerState = ServerContext.useStoreActions(actions => actions.clearServerState);" add :
|
|
|
|
const nestId = ServerContext.useStoreState(state => state.server.data?.nestId);
|
|
|
|
6.3 - In same file under :
|
|
|
|
"<Route path={`${match.path}/backups`} exact>
|
|
<RequireServerPermission permissions={'backup.*'}>
|
|
<BackupContainer/>
|
|
</RequireServerPermission>
|
|
</Route>"
|
|
|
|
add :
|
|
|
|
{nestId === 1 &&
|
|
<Route path={`${match.path}/mcmods`} exact>
|
|
<RequireServerPermission permissions={'mcmods.*'}>
|
|
<McModsContainer/>
|
|
</RequireServerPermission>
|
|
</Route>
|
|
}
|
|
FOR PANEL ABOVE 1.9 VERSION (from step 6.0 to 7.2)
|
|
|
|
6.0 - In resources/scripts/routers/routes.ts after:
|
|
|
|
"
|
|
{
|
|
path: '/files',
|
|
permission: 'file.*',
|
|
name: 'Files',
|
|
|
|
component: FileManagerContainer,
|
|
},
|
|
"
|
|
|
|
Add:
|
|
|
|
{
|
|
path: '/mcmods',
|
|
permission: 'mcmods.*',
|
|
name: 'Mods',
|
|
nestId: 1,
|
|
component: McModsContainer,
|
|
},
|
|
|
|
6.1 - In same file after "permission: string | string[] | null;" add :
|
|
|
|
nestId?: number;
|
|
eggId?: number;
|
|
|
|
6.2 - In same file after all import line add :
|
|
|
|
import McModsContainer from '@/components/server/mcmods/McModsContainer';
|
|
|
|
|
|
7.0 - In resources/scripts/routers/ServerRouter.ts after "import ConflictStateRenderer from '@/components/server/ConflictStateRenderer';" add :
|
|
|
|
import { Navigation, ComponentLoader } from '@/routers/ServerElement';
|
|
|
|
7.1 - In same file replace :
|
|
|
|
"
|
|
{routes.server
|
|
.filter((route) => !!route.name)
|
|
.map((route) =>
|
|
route.permission ? (
|
|
<Can key={route.path} action={route.permission} matchAny>
|
|
<NavLink to={to(route.path, true)} exact={route.exact}>
|
|
{route.name}
|
|
</NavLink>
|
|
</Can>
|
|
) : (
|
|
<NavLink key={route.path} to={to(route.path, true)} exact={route.exact}>
|
|
{route.name}
|
|
</NavLink>
|
|
)
|
|
)}
|
|
"
|
|
|
|
|
|
By:
|
|
|
|
<ComponentLoader />
|
|
|
|
|
|
7.2 - In same file replace :
|
|
|
|
"
|
|
{routes.server.map(({ path, permission, component: Component }) => (
|
|
<PermissionRoute key={path} permission={permission} path={to(path)} exact>
|
|
<Spinner.Suspense>
|
|
<Component />
|
|
</Spinner.Suspense>
|
|
</PermissionRoute>
|
|
))}
|
|
"
|
|
|
|
By :
|
|
|
|
<Navigation />
|
|
|
|
|
|
|
|
|
|
If you don't have yarn install it :
|
|
|
|
apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates
|
|
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
|
apt -y install nodejs
|
|
cd /var/www/pterodactyl
|
|
npm i -g yarn
|
|
yarn install
|
|
|
|
And build the panel assets :
|
|
|
|
yarn add html-react-parser
|
|
yarn build:production
|
|
chown -R www-data:www-data *
|
|
php artisan migrate
|
|
php artisan optimize
|
|
|
|
YOUR LICENSE : CONTACT ME ON DISCORD
|
|
|
|
FOR A URGENT SUPPORT PLEASE CONTACT ME DIRECTLY BY SMS OR EMAIL
|
|
If you need help contact me on discord : http://discord.bagou450.com/ (or https://discord.gg/bagou450)
|
|
You don't have discord ? Send me a SMS to +33 7 56 89 00 36 (Unsurcharged number, No call)
|
|
You prefer emails? Send a email to contact@bagou450.com
|