mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Event;
|
|
use App\Events;
|
|
use App\Listeners;
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The event listener mappings for the application.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $listen = [
|
|
//
|
|
];
|
|
|
|
/**
|
|
* Register any other events for your application.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
parent::boot();
|
|
|
|
if (option('enable_avatar_cache')) {
|
|
Event::listen(Events\GetAvatarPreview::class, Listeners\CacheAvatarPreview::class);
|
|
}
|
|
if (option('enable_preview_cache')) {
|
|
Event::listen(Events\GetSkinPreview::class, Listeners\CacheSkinPreview::class);
|
|
}
|
|
if (option('enable_notfound_cache')) {
|
|
Event::subscribe(Listeners\CachePlayerExists::class);
|
|
}
|
|
if (option('enable_json_cache')) {
|
|
Event::subscribe(Listeners\CachePlayerJson::class);
|
|
}
|
|
}
|
|
}
|