Method
try_parse_then_execute_command
(
&mut self,
packet: &packet::play::ChatCommand,
arg: &C::ParseArg,
)
Source from the content-addressed store, hash-verified
| 35 | } |
| 36 | |
| 37 | fn try_parse_then_execute_command<C: PlayerExecutableCommand>( |
| 38 | &mut self, |
| 39 | packet: &packet::play::ChatCommand, |
| 40 | arg: &C::ParseArg, |
| 41 | ) -> Result<(), PlayerError> { |
| 42 | self.command_manager |
| 43 | .try_parse::<C>(packet, arg, &self.connection.sender())? |
| 44 | .map(|c| c.execute(self)) |
| 45 | .transpose()?; |
| 46 | Ok(()) |
| 47 | } |
| 48 | |
| 49 | pub(super) fn define_commands(&mut self) -> Result<(), PlayerError> { |
| 50 | self.command_manager.register::<CommandGoto>(); |
Callers
nothing calls this directly
Tested by
no test coverage detected