blessing-skin-server/app/Providers/EventServiceProvider.php

54 lines
1.3 KiB
PHP
Raw Normal View History

2016-08-28 10:05:21 +08:00
<?php
namespace App\Providers;
use App\Events;
use App\Listeners;
2019-12-14 11:10:37 +08:00
use Event;
2016-08-28 10:05:21 +08:00
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'App\Events\PlayerRetrieved' => [
'App\Listeners\ResetInvalidTextureForPlayer',
],
2019-05-07 15:16:53 +08:00
'App\Events\TextureDeleting' => [
'App\Listeners\TextureRemoved',
],
2019-08-12 15:21:50 +08:00
'App\Events\PluginWasEnabled' => [
'App\Listeners\CopyPluginAssets',
'App\Listeners\GeneratePluginTranslations',
2019-08-12 15:21:50 +08:00
],
2019-09-09 23:08:03 +08:00
'plugin.versionChanged' => [
2019-08-12 15:21:50 +08:00
'App\Listeners\CopyPluginAssets',
'App\Listeners\GeneratePluginTranslations',
2019-08-12 15:21:50 +08:00
],
2019-08-31 09:12:51 +08:00
'App\Events\PluginBootFailed' => [
'App\Listeners\NotifyFailedPlugin',
],
2019-12-25 15:59:20 +08:00
'App\Events\RenderingHeader' => [
'App\Listeners\SerializeGlobals',
],
2016-08-28 10:05:21 +08:00
];
/**
* Register any other events for your application.
*
* @return void
*/
2018-07-11 16:09:54 +08:00
public function boot()
2016-08-28 10:05:21 +08:00
{
2018-07-11 16:09:54 +08:00
parent::boot();
if (option('enable_notfound_cache')) {
Event::subscribe(Listeners\CachePlayerExists::class);
}
2016-08-28 10:05:21 +08:00
}
}