form->fill(); } public function form(Schema $schema): Schema { return $schema ->schema([ TextInput::make('command') ->label('Commande RCON') ->placeholder('ex: list, say Bonjour') ->required() ->autofocus(), ]) ->statePath('data'); } public function executeCommand(MinecraftRconClient $client): void { $data = $this->form->getState(); $command = $data['command']; try { $response = $client->command($command); // Format response if empty $this->output = blank($response) ? "(Commande exécutée, aucun retour texte)" : $response; // Clear input $this->form->fill(); Notification::make() ->title('Commande envoyée') ->success() ->send(); } catch (\Throwable $e) { $this->output = null; Notification::make() ->title('Erreur RCON') ->body($e->getMessage()) ->danger() ->send(); } } }