| Total Complexity | 2 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package de.pewpewproject.lasertag.command.lasertag.game; |
||
| 18 | public class StopLasertagGameCommand extends ServerFeedbackCommand { |
||
| 19 | protected Optional<CommandFeedback> execute(CommandContext<ServerCommandSource> context) { |
||
| 20 | |||
| 21 | // Get the game managers |
||
| 22 | var gameManager = context.getSource().getWorld().getServerLasertagManager(); |
||
| 23 | |||
| 24 | gameManager.stopLasertagGame(); |
||
| 25 | |||
| 26 | return Optional.empty(); |
||
| 27 | } |
||
| 28 | |||
| 29 | static void register(LiteralArgumentBuilder<ServerCommandSource> lab) { |
||
| 30 | lab.then(literal("stopLasertagGame") |
||
| 31 | .requires(s -> s.hasPermissionLevel(1)) |
||
| 32 | .executes(new StopLasertagGameCommand())); |
||
| 33 | } |
||
| 35 |