mirror of
https://github.com/barkeser2002/pterodactyl-addons.git
synced 2026-09-25 13:46:05 +03:00
207 lines
7.3 KiB
Plaintext
207 lines
7.3 KiB
Plaintext
Hey Thanks for your purchase
|
|
|
|
First upload content of panel files folder.
|
|
|
|
1.1 - In resources/scripts/routers/routes.ts after :
|
|
|
|
"
|
|
{
|
|
path: '/files',
|
|
permission: 'file.*',
|
|
name: 'Files',
|
|
component: FileManagerContainer,
|
|
},
|
|
"
|
|
|
|
Add :
|
|
|
|
{
|
|
path: '/versions',
|
|
permission: 'file.*',
|
|
name: 'Version',
|
|
nestId: 1,
|
|
component: McVersionsContainer,
|
|
},
|
|
|
|
1.2 - In same file after "permission: string | string[] | null;" add :
|
|
|
|
nestId?: number;
|
|
eggId?: number;
|
|
nestIds?: number[];
|
|
eggIds?: number[];
|
|
|
|
1.3 - In same file after "import ServerActivityLogContainer from '@/components/server/ServerActivityLogContainer';" add :
|
|
|
|
import McVersionsContainer from '@/components/server/versions/McVersionsContainer';
|
|
|
|
2.1 - In resources/scripts/routers/ServerRouter.tsx 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 :
|
|
|
|
<Navigation />
|
|
|
|
|
|
2.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 :
|
|
|
|
<ComponentLoader />
|
|
|
|
|
|
2.3 - In same file under "import PermissionRoute from '@/components/elements/PermissionRoute';" add :
|
|
|
|
import { Navigation, ComponentLoader } from '@/routers/ServerElements';
|
|
|
|
3.1 - In resources/scripts/api/server/getServer.ts under "allocations: Allocation[];" add :
|
|
|
|
mcversion: string;
|
|
nestId: number;
|
|
eggId: number;
|
|
|
|
3.2 - In same file under
|
|
|
|
"
|
|
allocations: ((data.relationships?.allocations as FractalResponseList | undefined)?.data || []).map(
|
|
rawDataToServerAllocation
|
|
),
|
|
"
|
|
|
|
add :
|
|
|
|
mcversion: data.mcversion,
|
|
nestId: data.nest_id,
|
|
eggId: data.egg_id,
|
|
|
|
4 - In resources/scripts/api/http.ts above "export interface PaginationDataSet {" add :
|
|
|
|
export interface VersionsResult<T> {
|
|
items: T[];
|
|
}
|
|
|
|
5 - In resources/lang/en/activity.php above "'subuser' => [" add :
|
|
|
|
'versions' => [
|
|
'install' => 'Installation of :name',
|
|
],
|
|
|
|
6 - In routes/api-client.php above "Route::group(['prefix' => '/settings'], function () {" add :
|
|
|
|
Route::group(['prefix' => '/versions'], function () {
|
|
Route::get('/listversion', [Client\Servers\VersionsController::class, 'listversion']);
|
|
Route::get('/getversionsize', [Client\Servers\VersionsController::class, 'getversionsize']);
|
|
|
|
Route::post('/installversion', [Client\Servers\VersionsController::class, 'installversion']);
|
|
});
|
|
|
|
7.0 - In routes/admin.php at 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']);
|
|
|
|
});
|
|
|
|
|
|
7.1 - In same file under "Route::delete('/license/{addon}', [Admin\Bagou\BagouLicenseController::class, 'removelicense']);" add :
|
|
Route::group(['prefix' => 'settings/addon/mcversion'], function () {
|
|
Route::get('/', [Admin\Bagou\BagouMcVersionsController::class, 'index'])->name('admin.bagoucenter.settings.addon.mcversions');
|
|
Route::post('/', [Admin\Bagou\BagouMcVersionsController::class, 'add']);
|
|
Route::delete('/{name}', [Admin\Bagou\BagouMcVersionsController::class, 'delete']);
|
|
});
|
|
|
|
8 - In app/Transformers/Api/Client/ServerTransformer.php above "'node' => $server->node->name," add :
|
|
|
|
'mcversion' => $server->mcversion,
|
|
'nest_id' => $server->nest_id,
|
|
'egg_id' => $server->egg_id,
|
|
|
|
9 - 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>
|
|
|
|
|
|
|
|
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_14.x | sudo -E bash -
|
|
apt -y install nodejs
|
|
cd /var/www/pterodactyl
|
|
npm i -g yarn
|
|
yarn install
|
|
|
|
And build the panel assets :
|
|
|
|
yarn build:production
|
|
chown -R www-data:www-data * #or chown -R nginx:nginx * if you use last nginx version
|
|
php artisan migrate --force
|
|
php artisan optimize
|
|
|
|
In admin panel go in settings tab and in advanced tab change the connection timeout from 5 to 60.
|
|
|
|
After activate your addon trough bagou license tab in admin panel.
|
|
YOUR LICENSE : CONTACT ME ON DISCORD
|
|
IF YOU HAVE A CUSTOM MC EGG WITH CUSTOM DOCKER IMAGE THE ADDON ARE GOING TO RETURN A ERROR PLEASE CONTACT ME ON DISCORD
|
|
|
|
FOR A URGENT HELP 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
|
|
|
|
|