private void executeDockCommand(String[] commandString, Player player) throws CommandException {
        if (DockCommand.isDockCommand(commandString[0])) {
            DockCommand firstCommand = DockCommand.toCommand(commandString[0]);
            switch (firstCommand) {
            case UNDOCK:
                undock(player);
                break;
            case BUY:
                buy(commandString, player);
                break;
            case SELL:
                sell(commandString, player);
                break;
            case CARGO:
                displayDockCargo(player);
                break;
            case STORE:
                displayDockStore(player);
                break;
            case INSTALL:
                install(commandString, player);
                break;
            }
        } else {
            throw new CommandException("Invalid dock command: " + commandString[0]);
        }
    }