heading('Minecraft EULA') ->description('By pressing "I Accept" below you are indicating your agreement to the Minecraft EULA') ->registerActions([ Action::make($this->featureName()) ->action(function (DaemonFileRepository $fileRepository) { try { $fileRepository->putContent('eula.txt', 'eula=true'); } catch (\Exception $e) { Notification::make() ->title('Error') ->body($e->getMessage()) ->danger() ->send(); } } ), ]); } public function action(): Action { return Action::make($this->featureName()) ->form([ Placeholder::make('eula') ->label('By pressing I Accept below you are indicating your agreement to the Minecraft® EULA.'), ]) ->action(function (DaemonFileRepository $fileRepository) { try { $fileRepository->putContent('eula.txt', 'eula=true'); } catch (\Exception $e) { Notification::make() ->title('Error') ->body($e->getMessage()) ->danger() ->send(); } } ); } }